Sha256: df4c1925a01ce86c961bf0a1f82ad175238ae9628a30ea4e9f168dbc4285ff31
Contents?: true
Size: 613 Bytes
Versions: 56
Compression:
Stored size: 613 Bytes
Contents
class <%= migration_name.camelize %> < ActiveRecord::Migration def change create_table :<%= table_name %> do |t| <% attributes.each do |attribute| -%> <% if attribute.password_digest? -%> t.string :password_digest<%= attribute.inject_options %> <% else -%> t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %> <% end -%> <% end -%> <% if options[:timestamps] %> t.timestamps <% end -%> end <% attributes_with_index.each do |attribute| -%> add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %> <% end -%> end end
Version data entries
56 entries across 56 versions & 1 rubygems