Method: ActiveRecord::ConnectionAdapters::SchemaStatements#foreign_key_column_for

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

#foreign_key_column_for(table_name) ⇒ Object

:nodoc:



1063
1064
1065
1066
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb', line 1063

def foreign_key_column_for(table_name) # :nodoc:
  name = strip_table_name_prefix_and_suffix(table_name)
  "#{name.singularize}_id"
end