Tuesday, October 26, 2010

[Rails] Validating model depending on controller action

Hi,

I have a custom validation in my model, reviewing the content of some
field. This field indicates that the record is "closed", so it can not
be modified.

The only way to "reopen" the record is by executing an specific model
action: reopen.

So my question is: "how can I avoid to validate this field JUST for the
controller reopen action?"

Thanks in advance

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate