On Oct 26, 10:21 am, Alfredo Bonilla <[email protected]> wrote: > > Thanks for your answer. I would use the instance variable, but if my > code in the model looks like: > > validate :minutes_editable > ... > def minutes_editable > if minutes_closed_was > errors.add(:minutes_closed, "specifies that the board is closed. > To reopen, use contextual menu action.") > 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 > > -- > Posted viahttp://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 [email protected]. 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.

