method

references

rails latest stable - Class: ActiveRecord::ConnectionAdapters::TableDefinition

Method not available on this version

This method is only available on newer versions. The first available version (v2.0.3) is shown here.

references(*args)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 452
      def references(*args)
        options = args.extract_options!
        polymorphic = options.delete(:polymorphic)
        args.each do |col|
          column("#{col}_id", :integer, options)
          column("#{col}_type", :string, polymorphic.is_a?(Hash) ? polymorphic : options) unless polymorphic.nil?
        end
      end

1Note

See column

mikael ยท Feb 17, 20092 thanks

See the end part of the docs on column for example uses.