Is there a way to skip callbacks and validation by doing something along these lines in Rails 3?
Object.save(:validate => false, :skip_callbacks => true)
Thanks!
For skipping callbacks in Rails 3, you can use update_all
for your given purpose.
Source: update_all
The full list for skipping callbacks are here:
Source: Skipping Callbacks
Object.save(:validate => false)
works as you would expect. So far as I know you cannot turn off callbacks (unless you return false from a before_ callback, but that then aborts the transaction).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With