method

value_list

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: Fixture
value_list() 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 798
  def value_list
    list = @fixture.inject([]) do |fixtures, (key, value)|
      col = model_class.columns_hash[key] if model_class.respond_to?(:ancestors) && model_class.ancestors.include?(ActiveRecord::Base)
      fixtures << ActiveRecord::Base.connection.quote(value, col).gsub('[^\]\\n', "\n").gsub('[^\]\\r', "\r")
    end
    list * ', '
  end
Register or log in to add new notes.