Module: UseDb::Fixtures
- Defined in:
- lib/use_db/override_fixtures.rb
Overview
Put the fixtures in the correct database
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 |
# File 'lib/use_db/override_fixtures.rb', line 6 def self.included(base) unless base.respond_to?(:read_fixture_files_without_connection_set) base.alias_method_chain :read_fixture_files, :connection_set end end |
Instance Method Details
#read_fixture_files_with_connection_set ⇒ Object
12 13 14 15 |
# File 'lib/use_db/override_fixtures.rb', line 12 def read_fixture_files_with_connection_set @connection = (model_class||ActiveRecord::Base).connection read_fixture_files_without_connection_set end |