Skip to content

Instantly share code, notes, and snippets.

@maiha
Created February 14, 2013 05:07
Show Gist options
  • Save maiha/4950706 to your computer and use it in GitHub Desktop.
Save maiha/4950706 to your computer and use it in GitHub Desktop.
save without validations and callbacks in rails3
begin
klass.skip_callback(:create, :save)
record.save!(:validate => false)
ensure
klass.set_callback(:create, :save)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment