Forum: Ruby on Rails block default validation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Abhishek shukla (Guest)
on 2008-10-16 17:34
(Received via mailing list)
Hello friends,
How to avoid or block the default validation at the time of updating
records?

regards
Abhishek
Sniper A. (Guest)
on 2008-10-16 17:42
Abhishek shukla wrote:
> Hello friends,
> How to avoid or block the default validation at the time of updating
> records?
>
> regards
> Abhishek

in your validation call pass :on=>:create
validate_presence_of :field ,:on=>:create
Abhishek shukla (Guest)
on 2008-10-16 17:48
(Received via mailing list)
ya i got the solution
"update_attribute_with_validation_skipping"

Thanks
:)

On Thu, Oct 16, 2008 at 7:12 PM, Sniper A. <
Frederick C. (Guest)
on 2008-10-16 17:58
(Received via mailing list)
On 16 Oct 2008, at 14:47, Abhishek shukla wrote:

> ya i got the solution
> "update_attribute_with_validation_skipping"
>
plain old update_attribute doesn't validate.
or save(false) also skips validations

Fred
This topic is locked and can not be replied to.