Permalink
Browse files

Remove not needed begin..end from AR#save

  • Loading branch information...
carlosantoniodasilva committed Nov 19, 2012
1 parent 7e10f38 commit 3b99653587cead2f8b6ba4ee163c8b736d5f7f34
Showing with 3 additions and 5 deletions.
  1. +3 −5 activerecord/lib/active_record/persistence.rb
@@ -72,11 +72,9 @@ def persisted?
# +save+ returns +false+. See ActiveRecord::Callbacks for further
# details.
def save(*)
- begin
- create_or_update
- rescue ActiveRecord::RecordInvalid
- false
- end
+ create_or_update
+ rescue ActiveRecord::RecordInvalid
+ false
end
# Saves the model.

0 comments on commit 3b99653

Please sign in to comment.