Method: OrderOrder::Extensions#chronological

Defined in:
lib/order_order/extensions.rb

#chronological(column = DEFAULT_CHRONOLOGICAL_COLUMN) ⇒ Object

Order records by date, with the newest records first.

date. Defaults to ‘created_at`

Parameters:

  • column (String) (defaults to: DEFAULT_CHRONOLOGICAL_COLUMN)

    the name of the column which represents the object’s



15
16
17
# File 'lib/order_order/extensions.rb', line 15

def chronological(column=DEFAULT_CHRONOLOGICAL_COLUMN)
  order("#{column} ASC")
end