method

cast_values

Importance_0
v5.0.0.1 - 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 82
    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.deserialize(value) }
      end

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