Sha256: d6817c40997d794167f91ecaa697a653af4e9f808b1f3a337c7d2d63ced81c9a
Contents?: true
Size: 519 Bytes
Versions: 19
Compression:
Stored size: 519 Bytes
Contents
class <%= migration_class_name %> < ActiveRecord::Migration def change create_table :<%= table_name.gsub('cms_','') %> do |t| <% attributes.each do |attribute| -%> t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %> <% end -%> <% if options[:timestamps] %> t.timestamps <% end -%> end <% attributes_with_index.each do |attribute| -%> add_index :<%= table_name.gsub('cms_','') %>, :<%= attribute.index_name %><%= attribute.inject_index_options %> <% end -%> end end
Version data entries
19 entries across 19 versions & 1 rubygems