Sha256: f386615e4c6884676002faa35e0d8ce96e67dfcc37c426a68d8a2c43337de890
Contents?: true
Size: 483 Bytes
Versions: 36
Compression:
Stored size: 483 Bytes
Contents
class <%= migration_name.camelize %> < ActiveRecord::Migration def change create_table :<%= table_name %> do |t| t.belongs_to :<%= one %> t.belongs_to :<%= two %> <%- attributes.each do |attribute| -%> t.<%= attribute.split(':').second %> :<%= attribute.split(':').first %> <%- end -%> t.timestamps end <%- if create_index? -%> add_index :<%= table_name %>, :<%= one %>_id add_index :<%= table_name %>, :<%= two %>_id <%- end -%> end end
Version data entries
36 entries across 36 versions & 1 rubygems