method

column_alias_for

Importance_1
v1.2.6 - Show latest stable - 0 notes - Class: ActiveRecord::Calculations::ClassMethods
column_alias_for(*keys) private

Converts a given key to the value that the database adapter returns as as a usable column name.

  users.id #=> users_id
  sum(id) #=> sum_id
  count(distinct users.id) #=> count_distinct_users_id
  count(*) #=> count_all
Show source
Register or log in to add new notes.