class Create<%= res_name.classify.pluralize %> < ActiveRecord::Migration

def change
  create_table :<%= res_name.pluralize %> do |t|

<% res_attrs.each do |name, type| -%>

t.<%= type %> :<%= name %>

<% end -%>

  end
end

end