Methods

Class Public methods

new(class_names, config)

📝 Source code
# File activerecord/lib/active_record/fixtures.rb, line 500
      def initialize(class_names, config)
        @class_names = class_names.stringify_keys
        @config      = config

        # Remove string values that aren't constants or subclasses of AR
        @class_names.delete_if { |klass_name, klass| !insert_class(@class_names, klass_name, klass) }
      end
🔎 See on GitHub

Instance Public methods

[](fs_name)

📝 Source code
# File activerecord/lib/active_record/fixtures.rb, line 508
      def [](fs_name)
        @class_names.fetch(fs_name) {
          klass = default_fixture_model(fs_name, @config).safe_constantize
          insert_class(@class_names, fs_name, klass)
        }
      end
🔎 See on GitHub