Class: Arel::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/arel_extensions.rb

Instance Method Summary collapse

Instance Method Details

#alias(name = "#{self.name}_2") ⇒ Object



286
287
288
289
290
291
292
# File 'lib/arel_extensions.rb', line 286

def alias(name = "#{self.name}_2")
  if name.present?
    Arel::Nodes::TableAlias.new(self, name)
  else
    self
  end
end