Ruby on Rails
Tuesday, June 5, 2012
You should be able to reopen your models and use skip_callback. Example:
skip_callback :validate, :before, :save, :update, :destroy, etc
On Tuesday, June 5, 2012 at 5:25 AM, swati wrote:
Hi All,I have this requirement where in I am migrating data from database ofone system to database of a new system. The new system is a rails appand I want my migrations to go via active record validations, howeverI want the callbacks to be disabled. I tried usingModel.skip_callback(:save, :after, :my_callback)But this somehow does not skip the callbacks. Need help !!Thanks in advance !!--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 rubyonrails-talk@googlegroups.com.To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment