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
261 262 263 |
# File 'lib/arel_extensions.rb', line 261 def as table_name Arel::Nodes::TableAlias.new(self, table_name) end |
#xas(table_name) ⇒ Object
Install an alias, if present.
266 267 268 269 270 271 272 |
# File 'lib/arel_extensions.rb', line 266 def xas table_name if table_name.present? as table_name else self end end |