lib/generators/mdwa/code/templates/migration.rb in mdd-3.0.2 vs lib/generators/mdwa/code/templates/migration.rb in mdd-3.0.3

- old
+ new

@@ -1,5 +1,6 @@ +# -*- encoding : utf-8 -*- class Alter<%= @all_entities.select{|e| e.resource?}.collect{|e| e.file_name.camelize}.join('') %><%= @random_migration_key %> < ActiveRecord::Migration def self.up <%- @changes.each do |change| -%> <%= change[:type] %> :<%= MDWA::Generators::Model.new(change[:entity].model_name).plural_name %>, :<%= change[:column] %> <%= ", :#{change[:attr_type]}" unless change[:attr_type].blank? %> @@ -10,6 +11,6 @@ <%- @changes.each do |change| -%> <%= inverse_migration_type change[:type] %> :<%= MDWA::Generators::Model.new(change[:entity].model_name).plural_name %>, :<%= change[:column] %> <%= ", :#{change[:attr_type]}" if inverse_migration_type(change[:type]) == 'add_column' %> <%= ", :#{change[:from]}" unless change[:from].blank? %> <%- end -%> end -end \ No newline at end of file +end