public Method

Fixture.value_list

There's no documentation for this item.

Source Code

# File active_record/fixtures.rb, line 793
def value_list
  klass = @class_name.constantize rescue nil

  list = @fixture.inject([]) do |fixtures, (key, value)|
    col = klass.columns_hash[key] if klass.respond_to?(:ancestors) && klass.ancestors.include?(ActiveRecord::Base)
    fixtures << ActiveRecord::Base.connection.quote(value, col).gsub('[^\]\\n', "\n").gsub('[^\]\\r', "\r")
  end
  list * ', '
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.