static public Method

Fixtures.instantiate_fixtures(object, table_name, fixtures, load_instances = true)

There's no documentation for this item.

Source Code

# File active_record/fixtures.rb, line 476
def self.instantiate_fixtures(object, table_name, fixtures, load_instances = true)
  object.instance_variable_set "@#{table_name.to_s.gsub('.','_')}", fixtures
  if load_instances
    ActiveRecord::Base.silence do
      fixtures.each do |name, fixture|
        begin
          object.instance_variable_set "@#{name}", fixture.find
        rescue FixtureClassNotFound
          nil
        end
      end
    end
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.