Sha256: c665fbd084befef3cab2c8fe7047fb3bb297e83b6ba6c7b51d880f66e7c3bb83
Contents?: true
Size: 642 Bytes
Versions: 83
Compression:
Stored size: 642 Bytes
Contents
class <%= migration_class_name %> < 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 %> <% elsif attribute.type.to_s != 'asset' -%> 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
83 entries across 83 versions & 1 rubygems