diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-11-07 11:56:50 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-11-07 11:56:50 +0900 |
commit | 55b203dac1eb4b3430b313112b8d5a53b1016b4e (patch) | |
tree | 83c7fe3db6766055d812c48ed325af959d97d4c7 | |
parent | 759906d51272534941843fc80ae9f579b28c336c (diff) | |
download | rails-55b203dac1eb4b3430b313112b8d5a53b1016b4e.tar.gz rails-55b203dac1eb4b3430b313112b8d5a53b1016b4e.tar.bz2 rails-55b203dac1eb4b3430b313112b8d5a53b1016b4e.zip |
self.up, self.down => up, down
-rw-r--r-- | activerecord/README.rdoc | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/base.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/activerecord/README.rdoc b/activerecord/README.rdoc index b5db57569c..70922ef864 100644 --- a/activerecord/README.rdoc +++ b/activerecord/README.rdoc @@ -150,7 +150,7 @@ A short rundown of some of the major features: * Database agnostic schema management with Migrations. class AddSystemSettings < ActiveRecord::Migration - def self.up + def up create_table :system_settings do |t| t.string :name t.string :label @@ -162,7 +162,7 @@ A short rundown of some of the major features: SystemSetting.create :name => "notice", :label => "Use notice?", :value => 1 end - def self.down + def down drop_table :system_settings end end diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index feeebb7131..3558ae3545 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -760,7 +760,7 @@ module ActiveRecord #:nodoc: # values, eg: # # class CreateJobLevels < ActiveRecord::Migration - # def self.up + # def up # create_table :job_levels do |t| # t.integer :id # t.string :name @@ -774,7 +774,7 @@ module ActiveRecord #:nodoc: # end # end # - # def self.down + # def down # drop_table :job_levels # end # end diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 3f69f75565..6f135b56b5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -46,13 +46,13 @@ module ActiveRecord # +change_table+ is actually of this type: # # class SomeMigration < ActiveRecord::Migration - # def self.up + # def up # create_table :foo do |t| # puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition" # end # end # - # def self.down + # def down # ... # end # end @@ -479,4 +479,3 @@ module ActiveRecord end end - |