new(macro, name, scope, options, active_record) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/reflection.rb, line 227
      def initialize(macro, name, scope, options, active_record)
        super
        @collection = [:has_many, :has_and_belongs_to_many].include?(macro)
        @automatic_inverse_of = nil
        @type         = options[:as] && "#{options[:as]}_type"
        @foreign_type = options[:foreign_type] || "#{name}_type"
        @constructable = calculate_constructable(macro, options)
      end
Register or log in to add new notes.