aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorKyle Stevens <kstevens715@gmail.com>2013-05-11 22:32:33 -0400
committerKyle Stevens <kstevens715@gmail.com>2013-05-11 22:39:39 -0400
commit443f8dd5cdb273327a8b03a97c431de67c15ace6 (patch)
tree68806f15279342f0daecb07ee65605d52413b5b6 /activerecord/lib/active_record
parent51157c9b46cb200b45554700dae3b4026f268b7f (diff)
downloadrails-443f8dd5cdb273327a8b03a97c431de67c15ace6.tar.gz
rails-443f8dd5cdb273327a8b03a97c431de67c15ace6.tar.bz2
rails-443f8dd5cdb273327a8b03a97c431de67c15ace6.zip
Call assume_migrated_upto_version on connection
Call assume_migrated_upto_version on connection to prevent it from first being picked up in method_missing. In the base class, Migration, method_missing expects the argument to be a table name, and calls proper_table_name on the arguments before sending to connection. If table_name_prefix or table_name_suffix is used, the schema version changes to prefix_version_suffix, breaking `rake test:prepare`. Fixes #10411.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/schema.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/schema.rb b/activerecord/lib/active_record/schema.rb
index 3259dbbd80..4bfd0167a4 100644
--- a/activerecord/lib/active_record/schema.rb
+++ b/activerecord/lib/active_record/schema.rb
@@ -43,7 +43,7 @@ module ActiveRecord
unless info[:version].blank?
initialize_schema_migrations_table
- assume_migrated_upto_version(info[:version], migrations_paths)
+ connection.assume_migrated_upto_version(info[:version], migrations_paths)
end
end