24 Apr '16, 10pm

.。oO(へぇ…) create_join_table (ActiveRecord::ConnectionAdapters::SchemaStatements) - APIdock https://t.co/B0EwGEF8C3

Creates a new join table with the name created using the lexical order of the first two arguments. These arguments can be a String or a Symbol . # Creates a table called 'assemblies_parts' with no id. create_join_table ( :assemblies , :parts ) You can pass a options hash can include the following keys: :table_name Sets the table name overriding the default :column_options Any extra options you want appended to the columns definition. :options Any extra options you want appended to the table definition. :temporary Make a temporary table. :force Set to true to drop the table before creating it. Defaults to false. Note that create_join_table does not create any indices by default; you can use its block form to do so yourself: create_join_table :products , :categories do | t | t . index :product_id t . index :category_id end Add a backend specific option to the generated SQL (...

Full article: http://apidock.com/rails/ActiveRecord/ConnectionAdapters/...

Tweets