From 3b99653587cead2f8b6ba4ee163c8b736d5f7f34 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 19 Nov 2012 12:50:44 -0200 Subject: Remove not needed begin..end from AR#save --- activerecord/lib/active_record/persistence.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'activerecord/lib/active_record/persistence.rb') diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 45f5406cc3..1c17c578e9 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -72,11 +72,9 @@ module ActiveRecord # +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. -- cgit v1.2.3