method

cast_values

Importance_0
v4.2.9 - Show latest stable - 0 notes - Class: Result
cast_values(type_overrides = {}) 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/result.rb, line 81
    def cast_values(type_overrides = {}) # :nodoc:
      types = columns.map { |name| column_type(name, type_overrides) }
      result = rows.map do |values|
        types.zip(values).map { |type, value| type.type_cast_from_database(value) }
      end

      columns.one? ? result.map!(&:first) : result
    end
Register or log in to add new notes.