Method: ActiveRecord::ConnectionAdapters::SchemaStatements#drop_join_table
- Defined in:
- activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
#drop_join_table(table_1, table_2, **options) ⇒ Object
Drops the join table specified by the given arguments. See #create_join_table and #drop_table for details.
Although this command ignores the block if one is given, it can be helpful to provide one in a migration’s change method so it can be reverted. In that case, the block will be used by #create_join_table.
427 428 429 430 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb', line 427 def drop_join_table(table_1, table_2, **) join_table_name = find_join_table_name(table_1, table_2, ) drop_table(join_table_name, **) end |