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.
589525f133e603e1f17af9b03176c000?d=identicon&s=25 Abhishek shukla (Guest)
on 2008-10-16 15:34
(Received via mailing list)
Hello friends,
How to avoid or block the default validation at the time of updating
records?

regards
Abhishek
1b507a552850441a516948d488962d2e?d=identicon&s=25 Sniper Abandon (mokkai)
on 2008-10-16 15: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
589525f133e603e1f17af9b03176c000?d=identicon&s=25 Abhishek shukla (Guest)
on 2008-10-16 15: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 Abandon <
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-16 15: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.