diff --git a/generators/acts_as_account/acts_as_account_generator.rb b/generators/acts_as_account/acts_as_account_generator.rb new file mode 100644 index 0000000..f3ba51f --- /dev/null +++ b/generators/acts_as_account/acts_as_account_generator.rb @@ -0,0 +1,7 @@ +class ActsAsAccountGenerator < Rails::Generator::NamedBase + def manifest + record do |m| + m.migration_template 'migration.rb', 'db/migrate', :migration_file_name => "acts_as_account_migration" + end + end +end diff --git a/generators/acts_as_account/templates/migration.rb b/generators/acts_as_account/templates/migration.rb new file mode 100644 index 0000000..920adc1 --- /dev/null +++ b/generators/acts_as_account/templates/migration.rb @@ -0,0 +1,9 @@ +class ActsAsAccountMigration < ActiveRecord::Migration + def self.up + load(File.dirname(__FILE__) + '../../../db/schema.rb') + end + + def self.down + # TODO: add down migration, when schema.rb was replaced + end +end \ No newline at end of file