method

column_alias_for

Importance_1

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v7.0.0) is shown here.

These similar methods exist in v7.1.3.2:

column_alias_for(field) private

Converts the given field to the value that the database adapter returns as a usable column name:

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