Sha256: 2ac4dbe17cf4493c3f4a59038211073ebdfd26704b666e372a057dda8d05ba88
Contents?: true
Size: 392 Bytes
Versions: 2
Compression:
Stored size: 392 Bytes
Contents
class Create<%= @model.plural_name.camelize %> < ActiveRecord::Migration def self.up create_table :<%= @model.plural_name %> do |t| <%- @model.simple_attributes.each do |attr| %> t.<%= attr.migration_field %> :<%= attr.name %><%- end %> <%- unless options.skip_timestamp %> t.timestamps <%- end %> end end def self.down drop_table :<%= @model.plural_name %> end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mdd-2.0.1 | lib/generators/mdd/scaffold/templates/db_migrate/migrate.rb |
mdd-2.0 | lib/generators/mdd/scaffold/templates/db_migrate/migrate.rb |