method

try_to_load_dependency

Importance_0
v4.1.8 - Show latest stable - 0 notes - Class: ActiveRecord::TestFixtures::ClassMethods
try_to_load_dependency(file_name) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/fixtures.rb, line 861
      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
Register or log in to add new notes.