Module: Raymond
- Defined in:
- lib/raymond.rb,
lib/raymond/model.rb,
lib/raymond/control.rb
Overview
module SortHelper
def sort_header(key, label) current = @sorterer.current_attr?(key) symbol = current ? "#SORTING_SYMBOLS[@sorterer.dir] " : '' link_to "#symbol#label", "?sort=#key-#? @sorterer.inverse_dir : Raymond::DEFAULT_SORTING_DIR.to_s" end
end
Defined Under Namespace
Modules: Model Classes: Control
Constant Summary collapse
- SORTING_DIRECTIONS =
{:up => 'ASC', :down => 'DESC'}
- SORTING_SYMBOLS =
⇓ ⇑ ➷ ➹ ➴ ➶ ▼ ▲
{:up => '▲', :down => '▼'}
- DEFAULT_SORTING_DIR =
:down