Method: ActiveRecord::Reflection.create

Defined in:
activerecord/lib/active_record/reflection.rb

.create(macro, name, scope, options, ar) ⇒ Object



18
19
20
21
# File 'activerecord/lib/active_record/reflection.rb', line 18

def create(macro, name, scope, options, ar)
  reflection = reflection_class_for(macro).new(name, scope, options, ar)
  options[:through] ? ThroughReflection.new(reflection) : reflection
end