for => each in model migration template
This commit is contained in:
parent
e7d600dcdb
commit
159213001a
@ -1,7 +1,7 @@
|
||||
class <%= migration_class_name %> < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :<%= table_name %> do |t|
|
||||
<% for attribute in attributes -%>
|
||||
<% attributes.each do |attribute| -%>
|
||||
t.<%= attribute.type %> :<%= attribute.name %>
|
||||
<% end -%>
|
||||
<% if options[:timestamps] %>
|
||||
|
Loading…
Reference in New Issue
Block a user