module Mobility::Plugins::Arel::MobilityExpressions
Public Instance Methods
as(*)
click to toggle source
@note 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. Extending +::Arel::Expressions+ is necessary to convince ActiveRecord that this node should not be stringified, which otherwise would result in garbage SQL.
Calls superclass method
# File lib/mobility/plugins/arel.rb, line 26 def as(*) super .extend(::Arel::Expressions) .extend(Countable) end