Class: Arel::SelectManager
- Inherits:
-
Object
- Object
- Arel::SelectManager
- Defined in:
- lib/arel_extensions.rb
Instance Method Summary collapse
- #as(table_name) ⇒ Object
-
#xas(table_name) ⇒ Object
Install an alias, if present.
Methods included from ArelExtensions::SetFunctions
#+, #union, #union_all, #uniq
Instance Method Details
#as(table_name) ⇒ Object
259 260 261 |
# File 'lib/arel_extensions.rb', line 259 def as table_name Arel::Nodes::TableAlias.new(self, table_name) end |
#xas(table_name) ⇒ Object
Install an alias, if present.
264 265 266 267 268 269 270 |
# File 'lib/arel_extensions.rb', line 264 def xas table_name if table_name.present? as table_name else self end end |