Permalink
Browse files

Use . instead of :: for class methods, add CHANGELOG entries

  • Loading branch information...
1 parent 4845c06 commit 03f2249153ae4d2078646e6796d8b9e5ef747fba @josevalim josevalim committed Jun 10, 2012
View
3 activerecord/CHANGELOG.md
@@ -1,5 +1,8 @@
## Rails 4.0.0 (unreleased) ##
+* Added `ActiveRecord::Migration.check_pending!` that raises an error if
+ migrations are pending. *Richard Schneeman*
+
* Added `#destroy!` which acts like `#destroy` but will raise an
`ActiveRecord::RecordNotDestroyed` exception instead of returning `false`.
View
4 activerecord/lib/active_record/migration.rb
@@ -342,7 +342,7 @@ def initialize(app)
def call(env)
ActiveRecord::Migration.check_pending!
- status, headers, body = @app.call(env)
+ @app.call(env)
end
end
@@ -351,7 +351,7 @@ class << self
end
def self.check_pending!
- raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator::needs_migrations?
+ raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?
end
def self.method_missing(name, *args, &block) # :nodoc:
View
4 activerecord/test/cases/migration_test.rb
@@ -63,12 +63,12 @@ def test_migrator_versions
ActiveRecord::Migrator.up(migrations_path)
assert_equal 3, ActiveRecord::Migrator.current_version
assert_equal 3, ActiveRecord::Migrator.last_version
- assert_equal false, ActiveRecord::Migrator.needs_migrations?
+ assert_equal false, ActiveRecord::Migrator.needs_migration?
ActiveRecord::Migrator.down(MIGRATIONS_ROOT + "/valid")
assert_equal 0, ActiveRecord::Migrator.current_version
assert_equal 3, ActiveRecord::Migrator.last_version
- assert_equal true, ActiveRecord::Migrator.needs_migrations?
+ assert_equal true, ActiveRecord::Migrator.needs_migration?
end
def test_create_table_with_force_true_does_not_drop_nonexisting_table
View
2 railties/CHANGELOG.md
@@ -1,5 +1,7 @@
## Rails 4.0.0 (unreleased) ##
+* Set `config.active_record.migration_error` to `:page_load` for development *Richard Schneeman*
+
* Add runner to Rails::Railtie as a hook called just after runner starts. *José Valim & kennyj*
* Add `/rails/info/routes` path, displays same information as `rake routes` *Richard Schneeman & Andrew White*
View
2 railties/test/application/configuration_test.rb
@@ -49,7 +49,7 @@ def teardown
RUBY
require "#{app_path}/config/environment"
- ActiveRecord::Migrator.stubs(:needs_migrations?).returns(true)
+ ActiveRecord::Migrator.stubs(:needs_migration?).returns(true)
get "/foo"
assert_equal 500, last_response.status

0 comments on commit 03f2249

Please sign in to comment.