On Oct 27, 8:56 am, Dharmdip Rathod <[EMAIL PROTECTED]>
wrote:
> Hi all
>
> I want to disable validation when i m calling the edit method. The
> reason y i want to do this is that i m allowing only certain fields to
> be edited. I dont want to pass hidden values.
>
> Is there any method to disable validation when i call a certain method?
You can do pretty much what you want with some combination of
the :if/:unless options on validations and the :on option (method
there refers to create/save/update - it has nothing to do with a
controller method).
Or just call save(false) from your controller if you don't want any
validations to run.
Fred
>
> Thanks
> --
> 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
-~----------~----~----~----~------~----~------~--~---