Sha256: bad2482d2e77b412788058cc8febebb411d0692600c4c909dc61bed117fa8ed4

Contents?: true

Size: 352 Bytes

Versions: 4

Compression:

Stored size: 352 Bytes

Contents

class Create<%= module_name %><%= plural_class %> < ActiveRecord::Migration
  def change
    create_table :<%= "#{namespace_underscore}_" if namespace_name %><%= plural_name %> do |t|  
      <%- model_attributes.each do |attribute| -%>
      t.<%= attribute.type %> :<%= attribute.name %>
      <%- end -%>
      
      t.timestamps
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zscaffold_admin-0.0.4 lib/generators/scaffold_admin/templates/migration.rb
zscaffold_admin-0.0.3 lib/generators/scaffold_admin/templates/migration.rb
zscaffold_admin-0.0.2 lib/generators/scaffold_admin/templates/migration.rb
zscaffold_admin-0.0.1 lib/generators/scaffold_admin/templates/migration.rb