class method self.new

Ruby on Rails 4.1.16

Since v4.1.16 Last seen in v7.0.10

Available in: v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10

Signature

self.new(class_names, config)

No documentation comment.

Parameters

class_names req
config req
Source
# File activerecord/lib/active_record/fixtures.rb, line 457
      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 { |k,klass|
          unless klass.is_a? Class
            klass = klass.safe_constantize
            ActiveSupport::Deprecation.warn("The ability to pass in strings as a class name to `set_fixture_class` will be removed in Rails 4.2. Use the class itself instead.")
          end
          !insert_class(@class_names, k, klass)
        }
      end

Defined in activerecord/lib/active_record/fixtures.rb line 457 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::FixtureSet::ClassCache

Type at least 2 characters to search.

↑↓ navigate · open · esc close