Sha256: 760f84c0d3a3bb238e3fbd76ccb8e9d947738fb21a45dd0f8e82db8a4289039b
Contents?: true
Size: 610 Bytes
Versions: 84
Compression:
Stored size: 610 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 %> <% 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
84 entries across 84 versions & 5 rubygems