aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-11-20 07:48:49 +0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-24 01:36:59 +0800
commit861cdc4c59dabdc8cca42a9f29b7cccb3cd23505 (patch)
tree90c69bf35e7468f5314867df2214fd088e25ad68 /activerecord/lib
parent9c161599ac1e37eedd56bece4d975dde8cdaa151 (diff)
downloadrails-861cdc4c59dabdc8cca42a9f29b7cccb3cd23505.tar.gz
rails-861cdc4c59dabdc8cca42a9f29b7cccb3cd23505.tar.bz2
rails-861cdc4c59dabdc8cca42a9f29b7cccb3cd23505.zip
Remove unneeded local var.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/nested_attributes.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb
index a2101a02eb..15f83a8579 100644
--- a/activerecord/lib/active_record/nested_attributes.rb
+++ b/activerecord/lib/active_record/nested_attributes.rb
@@ -446,8 +446,7 @@ module ActiveRecord
end
def raise_nested_attributes_record_not_found(association_name, record_id)
- reflection = self.class.reflect_on_association(association_name)
- raise RecordNotFound, "Couldn't find #{reflection.klass.name} with ID=#{record_id} for #{self.class.name} with ID=#{id}"
+ raise RecordNotFound, "Couldn't find #{self.class.reflect_on_association(association_name).klass.name} with ID=#{record_id} for #{self.class.name} with ID=#{id}"
end
end
end