method
new
v4.2.1 -
Show latest stable
- Class:
ActiveRecord::Reflection::AssociationReflection
new(name, scope, options, active_record)public
No documentation available.
# File activerecord/lib/active_record/reflection.rb, line 277
def initialize(name, scope, options, active_record)
super
@automatic_inverse_of = nil
@type = options[:as] && (options[:foreign_type] || "#{options[:as]}_type")
@foreign_type = options[:foreign_type] || "#{name}_type"
@constructable = calculate_constructable(macro, options)
@association_scope_cache = {}
@scope_lock = Mutex.new
end