Method: TableSortable::Column::Sorter#array_proc
- Defined in:
- lib/table_sortable/column/sorter.rb
#array_proc ⇒ Object
12 13 14 |
# File 'lib/table_sortable/column/sorter.rb', line 12 def array_proc -> (sort_order, col=nil) { sort{ |a,b| col.value(sort_order == :asc ? a : b) <=> col.value(sort_order == :asc ? b : a) } } end |