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

Remove unnecessary overriding of #initialize

`#initialize` of `HasManyReflection`, `HasOneReflection` and
`BelongsToReflection` only pass all arguments to `super` by passed order.
These overriding can be removed.
This commit is contained in:
yui-knk 2016-02-02 20:36:44 +09:00
parent 7710d7f432
commit daf0f23b77

View file

@ -594,10 +594,6 @@ module ActiveRecord
end
class HasManyReflection < AssociationReflection # :nodoc:
def initialize(name, scope, options, active_record)
super(name, scope, options, active_record)
end
def macro; :has_many; end
def collection?; true; end
@ -612,10 +608,6 @@ module ActiveRecord
end
class HasOneReflection < AssociationReflection # :nodoc:
def initialize(name, scope, options, active_record)
super(name, scope, options, active_record)
end
def macro; :has_one; end
def has_one?; true; end
@ -636,10 +628,6 @@ module ActiveRecord
end
class BelongsToReflection < AssociationReflection # :nodoc:
def initialize(name, scope, options, active_record)
super(name, scope, options, active_record)
end
def macro; :belongs_to; end
def belongs_to?; true; end