diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-17 14:57:46 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-17 14:57:54 -0800 |
commit | 4d35f8b6615d31fbed4806ee3c260e24447f435b (patch) | |
tree | 61fffc67fab357cf83549cb840ad0739e75fff56 /activerecord/lib/rails/generators/active_record/model/templates | |
parent | c1a63c8dba00b9f6ed81b3a46ecf595273cd876d (diff) | |
download | rails-4d35f8b6615d31fbed4806ee3c260e24447f435b.tar.gz rails-4d35f8b6615d31fbed4806ee3c260e24447f435b.tar.bz2 rails-4d35f8b6615d31fbed4806ee3c260e24447f435b.zip |
updating generators
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model/templates')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/model/templates/migration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/templates/migration.rb b/activerecord/lib/rails/generators/active_record/model/templates/migration.rb index 1f68487304..70e064be21 100644 --- a/activerecord/lib/rails/generators/active_record/model/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/model/templates/migration.rb @@ -1,5 +1,5 @@ class <%= migration_class_name %> < ActiveRecord::Migration - def self.up + def up create_table :<%= table_name %> do |t| <% for attribute in attributes -%> t.<%= attribute.type %> :<%= attribute.name %> @@ -10,7 +10,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration end end - def self.down + def down drop_table :<%= table_name %> end end |