Possible Duplicate:
How can I avoid running ActiveRecord callbacks?
In rails 2 there was a private method on active_records called create_without_callbacks which you could call to save a record into the database without triggering the callbacks associated with that object. This method has disappeared in rails 3, is there any way to achieve the same thing?
You are preventing certain business logic from happening when you'd call create_without_callbacks
. Consider removing the callbacks if they are not needed, or use the :if
and :unless
options to trigger the callback only when needed.
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