instance method
try_to_load_dependency
Ruby on Rails 4.1.16
Since v2.3.18 Last seen in v4.1.16Signature
try_to_load_dependency(file_name)
No documentation comment.
Parameters
-
file_namereq
Source
# File activerecord/lib/active_record/fixtures.rb, line 863
def try_to_load_dependency(file_name)
require_dependency file_name
rescue LoadError => e
unless fixture_class_names.key?(file_name.pluralize)
if ActiveRecord::Base.logger
ActiveRecord::Base.logger.warn("Unable to load #{file_name}, make sure you added it to ActiveSupport::TestCase.set_fixture_class")
ActiveRecord::Base.logger.warn("underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}")
end
end
end
Defined in activerecord/lib/active_record/fixtures.rb line 863
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::TestFixtures::ClassMethods