module ScopedAssociations::ActiveRecord5::HasManyClassMethods
Public Instance Methods
build(model, name, scope, options, &block)
click to toggle source
Calls superclass method
# File lib/scoped_associations/activerecord5/has_many.rb, line 8 def build(model, name, scope, options, &block) reflection = super(model, name, scope, options, &block) extend_reflection(reflection) reflection end
extend_reflection(reflection)
click to toggle source
# File lib/scoped_associations/activerecord5/has_many.rb, line 14 def extend_reflection(reflection) if reflection.options[:scoped] reflection.extend ReflectionExtension end end
valid_options(options)
click to toggle source
Calls superclass method
# File lib/scoped_associations/activerecord5/has_many.rb, line 4 def valid_options(options) super + [:scoped] end