Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

no need to to_sym

  • Loading branch information...
commit 946ac5eb4326f6a9eeee4322cf66c7cec465c670 1 parent c856d89
@tenderlove tenderlove authored
View
2  activerecord/lib/active_record/associations/builder/collection_association.rb
@@ -55,7 +55,7 @@ def define_callback(callback_name)
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
View
2  activerecord/lib/active_record/associations/collection_association.rb
@@ -523,7 +523,7 @@ def callback(method, record)
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

1 comment on commit 946ac5e

@spastorino
Owner

:heart:

Please sign in to comment.
Something went wrong with that request. Please try again.