Sha256: c332533043ecba91a00f9a14b6497819acbaf234a7864e28c688f8412e712998
Contents?: true
Size: 709 Bytes
Versions: 3
Compression:
Stored size: 709 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 Dust::CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "app_<%= plural_name %>", :url => "/app/<%= plural_name %>"}) <%- unless options[:skip_frontend] %> Dust::MenuItem.create({:title => "All <%=plural_class_name%>", :url => "/all-<%=plural_name%>", :active => true}) <%- end -%> def self.down drop_table :<%= plural_name %> end end
Version data entries
3 entries across 3 versions & 1 rubygems