Method: ActiveRecord::ConnectionAdapters::SchemaStatements#foreign_key_options

Defined in:
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

#foreign_key_options(from_table, to_table, options) ⇒ Object

:nodoc:



1068
1069
1070
1071
1072
1073
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb', line 1068

def foreign_key_options(from_table, to_table, options) # :nodoc:
  options = options.dup
  options[:column] ||= foreign_key_column_for(to_table)
  options[:name]   ||= foreign_key_name(from_table, options)
  options
end