diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-31 18:07:06 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-31 18:07:06 -0700 |
commit | 946ac5eb4326f6a9eeee4322cf66c7cec465c670 (patch) | |
tree | a2b9cf88f699321767c2538a67cc8eadbe4d89bb /activerecord | |
parent | c856d895bd054d0c474f1a3876257400db529590 (diff) | |
download | rails-946ac5eb4326f6a9eeee4322cf66c7cec465c670.tar.gz rails-946ac5eb4326f6a9eeee4322cf66c7cec465c670.tar.bz2 rails-946ac5eb4326f6a9eeee4322cf66c7cec465c670.zip |
no need to to_sym
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/collection_association.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/builder/collection_association.rb b/activerecord/lib/active_record/associations/builder/collection_association.rb index 78000a3e3a..2311754012 100644 --- a/activerecord/lib/active_record/associations/builder/collection_association.rb +++ b/activerecord/lib/active_record/associations/builder/collection_association.rb @@ -55,7 +55,7 @@ module ActiveRecord::Associations::Builder full_callback_name = "#{callback_name}_for_#{name}" # TODO : why do i need method_defined? I think its because of the inheritance chain - model.class_attribute full_callback_name.to_sym unless model.method_defined?(full_callback_name) + model.class_attribute full_callback_name unless model.method_defined?(full_callback_name) model.send("#{full_callback_name}=", Array(options[callback_name.to_sym])) end diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index b4047b08bc..f7c49ec057 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -523,7 +523,7 @@ module ActiveRecord def callbacks_for(callback_name) full_callback_name = "#{callback_name}_for_#{reflection.name}" - owner.class.send(full_callback_name.to_sym) || [] + owner.class.send(full_callback_name) || [] end # Should we deal with assoc.first or assoc.last by issuing an independent query to |