diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-24 01:29:49 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-24 01:29:49 +0000 |
commit | 0eb8398cfa6d4abf20c85fa59fa1a284dd992172 (patch) | |
tree | d87f26f88f28146450a7e2286bb5ce8adf993535 /activerecord/lib/active_record | |
parent | be7f86e37ac21585ad2621e2e0938c68a7a71360 (diff) | |
download | rails-0eb8398cfa6d4abf20c85fa59fa1a284dd992172.tar.gz rails-0eb8398cfa6d4abf20c85fa59fa1a284dd992172.tar.bz2 rails-0eb8398cfa6d4abf20c85fa59fa1a284dd992172.zip |
Fixtures use the table name and connection from set_fixture_class. Closes #7330.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 06e39e0829..cf05b63779 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -276,6 +276,8 @@ class Fixtures < YAML::Omap @class_name = class_name || (ActiveRecord::Base.pluralize_table_names ? @table_name.singularize.camelize : @table_name.camelize) @table_name = ActiveRecord::Base.table_name_prefix + @table_name + ActiveRecord::Base.table_name_suffix + @table_name = class_name.table_name if class_name.respond_to?(:table_name) + @connection = class_name.connection if class_name.respond_to?(:connection) read_fixture_files end |