Sha256: 9b1a8e76f7af3596c40a372cf71f453f8d048196fb03c9ba8f933648ef89306c

Contents?: true

Size: 419 Bytes

Versions: 15

Compression:

Stored size: 419 Bytes

Contents

# -*- encoding : utf-8 -*-
class Add<%= @model.attributes.collect{|a| a.name.camelize}.join('') %>ToUsers < ActiveRecord::Migration

	def self.up
		<%- @model.simple_attributes.each do |attr| -%>
			add_column :users, :<%= attr.name %>, :<%= attr.migration_field %>
		<%- end -%>
	end

	def self.down 
		<%- @model.simple_attributes.each do |attr| -%>
			remove_column :users, :<%= attr.name %>
		<%- end -%>
	end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mdd-3.0.20 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.19 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.18 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.17 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.16 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.15 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.14 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.13 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.10 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.9 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.8 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.7 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.6 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.4 lib/generators/mdwa/user_scaffold/templates/migrate.rb
mdd-3.0.3 lib/generators/mdwa/user_scaffold/templates/migrate.rb