>Mark Reginald James wrote: >> Michael Kahle wrote: > >> Ooo. Another thought. I noticed that you are doing a transaction >> without using the "rescue" catch. If something else goes wrong, besides >> validation, you will never know what happened! :) > > Unless you have a pre-save model callback preventing the save for > a specific reason by returning false, that you wish to signal to > the user, such exceptions are better handled by an app-wide catcher.
I'm really not sure what a pre-save model callback is. This is rapidly getting over my head! :) Are you saying that anything caught by "rescue" is something that you wouldn't want to pass back to the user? Is this because, let's say, in the event of a database failure it would better to send this to a log file or something similar? Is the idea behind what you are saying that we should only be passing validation errors back to the user? This would make sense to me. I'm just far too green with Ruby at this point to even think about that. Thanks again. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---