diff options
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 3 | ||||
-rw-r--r-- | guides/source/active_record_querying.md | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index f74e903348..7c3988859f 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -63,6 +63,7 @@ class MigrationTest < ActiveRecord::TestCase def test_migrator_versions migrations_path = MIGRATIONS_ROOT + "/valid" + old_path = ActiveRecord::Migrator.migrations_paths ActiveRecord::Migrator.migrations_paths = migrations_path ActiveRecord::Migrator.up(migrations_path) @@ -74,6 +75,8 @@ class MigrationTest < ActiveRecord::TestCase assert_equal 0, ActiveRecord::Migrator.current_version assert_equal 3, ActiveRecord::Migrator.last_version assert_equal true, ActiveRecord::Migrator.needs_migration? + ensure + ActiveRecord::Migrator.migrations_paths = old_path end def test_create_table_with_force_true_does_not_drop_nonexisting_table diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 57e8e080f4..cf0249a400 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1301,7 +1301,7 @@ especially useful if a `default_scope` is specified in the model and should not applied for this particular query. ```ruby -Client.unscoped.all +Client.unscoped.load ``` This method removes all scoping and will do a normal query on the table. |