method
create
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::Reflection
create(macro, name, scope, options, ar)public
No documentation available.
# File activerecord/lib/active_record/reflection.rb, line 13
def self.create(macro, name, scope, options, ar)
case macro
when :has_many, :belongs_to, :has_one
klass = options[:through] ? ThroughReflection : AssociationReflection
when :composed_of
klass = AggregateReflection
end
klass.new(macro, name, scope, options, ar)
end