- Included in:
- Defined in:
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#as ⇒ Object
This is necessary in order to ensure that when a translated attribute is selected with an alias using
AS, the resulting expression can still be counted without blowing up.
::Arel::Expressions is necessary to convince ActiveRecord that this node should not be stringified, which otherwise would result in garbage SQL.
19 20 21 22 23
# File 'lib/mobility/arel.rb', line 19 def as(*) super .extend(::Arel::Expressions) .extend() end