Method: OrderOrder::Extensions#alphabetical

Defined in:
lib/order_order/extensions.rb

#alphabetical(column_or_options = DEFAULT_ALPHABETICAL_COLUMN, options = {}) ⇒ Object

Order records alphabetically.

Parameters:

  • column_or_options (String) (defaults to: DEFAULT_ALPHABETICAL_COLUMN)

    the name of the column which represents the object’s name, or a hash of options. Defaults to ‘“name”`.

  • case_sensitive (Hash)

    a customizable set of options



34
35
36
37
# File 'lib/order_order/extensions.rb', line 34

def alphabetical(column_or_options=DEFAULT_ALPHABETICAL_COLUMN, options={})
  column = get_alphabetical_column(column_or_options, options)
  order("#{column} ASC")
end