Flowdock
method

new

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: ReferenceDefinition
new( name, polymorphic: false, index: true, foreign_key: false, type: :integer, **options ) 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/connection_adapters/abstract/schema_definitions.rb, line 69
      def initialize(
        name,
        polymorphic: false,
        index: true,
        foreign_key: false,
        type: :integer,
        **options
      )
        @name = name
        @polymorphic = polymorphic
        @index = index
        @foreign_key = foreign_key
        @type = type
        @options = options

        if polymorphic && foreign_key
          raise ArgumentError, "Cannot add a foreign key to a polymorphic relation"
        end
      end
Register or log in to add new notes.