Flowdock
method

new

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: Fixtures

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

These similar methods exist in v4.0.2:

new(connection, table_name, class_name, fixture_path) 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 529
    def initialize(connection, table_name, class_name, fixture_path)
      @connection   = connection
      @table_name   = table_name
      @fixture_path = fixture_path
      @name         = table_name # preserve fixture base name
      @class_name   = class_name

      @fixtures     = ActiveSupport::OrderedHash.new
      @table_name   = "#{ActiveRecord::Base.table_name_prefix}#{@table_name}#{ActiveRecord::Base.table_name_suffix}"

      # Should be an AR::Base type class
      if class_name.is_a?(Class)
        @table_name   = class_name.table_name
        @connection   = class_name.connection
        @model_class  = class_name
      else
        @model_class  = class_name.constantize rescue nil
      end

      read_fixture_files
    end
Register or log in to add new notes.