Skip to content

Instantly share code, notes, and snippets.

@harukizaemon
Created August 10, 2009 05:02
Show Gist options
  • Save harukizaemon/165012 to your computer and use it in GitHub Desktop.
Save harukizaemon/165012 to your computer and use it in GitHub Desktop.
# Simplified from the original to exemplify the badness
begin
transaction do
@record.save! if @record.valid?
end
rescue ActiveRecord::RecordInvalid
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment