Method: ActiveRecord::Result#column_indexes
- Defined in:
- activerecord/lib/active_record/result.rb
#column_indexes ⇒ Object
:nodoc:
203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'activerecord/lib/active_record/result.rb', line 203 def column_indexes # :nodoc: @column_indexes ||= begin index = 0 hash = {} length = columns.length while index < length hash[columns[index]] = index index += 1 end hash.freeze end end |