Sha256: cc9fab8e5ce5020f5fc21763e493de0ec83f7d6d8c28917e4912d9e0db379c4f
Contents?: true
Size: 525 Bytes
Versions: 17
Compression:
Stored size: 525 Bytes
Contents
class Create<%= plural_class_name %> < ActiveRecord::Migration def self.up create_table :<%= plural_name %> do |t| <%- for attribute in model_attributes -%> t.<%= attribute.type %> :<%= attribute.name %> <%- end -%> <%- unless options[:skip_timestamps] -%> t.timestamps <%- end -%> end end CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "<%= plural_name %>", :url => "/<%= plural_name %>"}) def self.down drop_table :<%= plural_name %> end end
Version data entries
17 entries across 16 versions & 1 rubygems