1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove passing argument to singular and collection association readers

Follow up of 09cac8c67a.
This commit is contained in:
Ryuta Kamizono 2018-01-05 08:31:57 +09:00
parent 07563036b0
commit 39f6c6c641

View file

@ -104,8 +104,8 @@ module ActiveRecord::Associations::Builder # :nodoc:
def self.define_readers(mixin, name)
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
def #{name}(*args)
association(:#{name}).reader(*args)
def #{name}
association(:#{name}).reader
end
CODE
end