Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added generators

  • Loading branch information...
commit 2cd3be96357a1330bc3c3cbddd91e6b0418e862f 1 parent 98a0893
@blindgaenger authored
View
7 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
View
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.