diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-26 18:08:26 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-26 18:08:26 -0300 |
commit | 923e274313dda8c772922e859df681f3d050a30e (patch) | |
tree | ef31fe6a9a6e3ab9570e9eb0753f90f7e9faa29e /activerecord/lib/active_record/nested_attributes.rb | |
parent | e11e285b1373b0399433943198aefbcdd29db09b (diff) | |
parent | 00b024218f1c91fde1217ae4951bd2c817bc9ea9 (diff) | |
download | rails-923e274313dda8c772922e859df681f3d050a30e.tar.gz rails-923e274313dda8c772922e859df681f3d050a30e.tar.bz2 rails-923e274313dda8c772922e859df681f3d050a30e.zip |
Merge pull request #15300 from arthurnn/refactor_reflections
Refactor reflections
Diffstat (limited to 'activerecord/lib/active_record/nested_attributes.rb')
-rw-r--r-- | activerecord/lib/active_record/nested_attributes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index 29ed499b1b..7dc7169a02 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -305,7 +305,7 @@ module ActiveRecord options[:reject_if] = REJECT_ALL_BLANK_PROC if options[:reject_if] == :all_blank attr_names.each do |association_name| - if reflection = reflect_on_association(association_name) + if reflection = _reflect_on_association(association_name) reflection.autosave = true add_autosave_association_callbacks(reflection) @@ -542,7 +542,7 @@ module ActiveRecord end def raise_nested_attributes_record_not_found!(association_name, record_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}" + 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 |