Browse files

self.up, self.down => up, down

  • Loading branch information...
1 parent df43c98 commit 510e49b28038e462e83682ae88aaf35fd5d33c35 @amatsuda amatsuda committed with vijaydev Nov 7, 2011
View
4 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
View
4 activerecord/lib/active_record/base.rb
@@ -756,7 +756,7 @@ def column_methods_hash #:nodoc:
# values, eg:
#
# class CreateJobLevels < ActiveRecord::Migration
- # def self.up
+ # def up
# create_table :job_levels do |t|
# t.integer :id
# t.string :name
@@ -770,7 +770,7 @@ def column_methods_hash #:nodoc:
# end
# end
#
- # def self.down
+ # def down
# drop_table :job_levels
# end
# end
View
5 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -46,13 +46,13 @@ def add_column_options!(sql, options)
# +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 @@ def native
end
end
-

0 comments on commit 510e49b

Please sign in to comment.