Frederick Cheung wrote in post #957158: > On Oct 26, 10:21am, Alfredo Bonilla <li...@ruby-forum.com> wrote: >> end >> end >> >> where minutes_closed is the boolean field that just can be passed from >> true to false by executing the "reopen" action. > > Sorry not sure what you're asking now > >> How would you use the before_validation callback? > > It would be pretty much the same except that instead of adding an > error I'd raise some appropriate exception. > > Fred
Sorry about this, but... if I raise an exception... the update would be cancelled in both cases (coming from regular update or from this "reopen" action). I have to allow the second way (coming from reopen) -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.