activerecord-hackery--ransack/lib/ransack
Caleb Land bd22760223 Add multiple sort field support in sort_link
This patch allows users to sort on multiple fields with the sort_link
helper.

To specify sorting on multiple fields:

  sort_link(:kind, [:kind, 'name asc'])

This will create a sort link that sorts first by kind, and then by
name. The first `:kind` parameter ensures that the link generated
shows the sort status of the `kind` field.

When you specify a sort direction in the sort fields array, the
direction is locked to that direction. In the above example, clicking
the resulting link would toggle sorting of the kind field, but the name
field would always sort ascending.

Also added was the ability to specify multiple default_order fields
with a hash:

  sort_link(:kind, [:kind, :name],
            :default_order => { :name => 'asc', :kind => 'desc' })

Clicking the resulting link will toggle the sort directions of both
`name` and `kind`, sorting the `name` field by default ascending, and
the `kind` field descending.
2014-10-02 00:54:12 -04:00
..
adapters Clarify class methods for whitelisting in base.rb 2014-09-21 21:05:01 +02:00
helpers Add multiple sort field support in sort_link 2014-10-02 00:54:12 -04:00
locale fix ro translation for predicate present 2014-09-10 12:38:51 +03:00
nodes Follow up to #373. Fix Rspec deprecation error in test. 2014-05-16 00:23:06 +02:00
configuration.rb Follow up to #373. Fix Rspec deprecation error in test. 2014-05-16 00:23:06 +02:00
constants.rb Add not_true and not_false predicates 2014-08-27 01:50:47 +01:00
context.rb Try Rails 4.2.0/master on Ransack master 2014-09-22 21:07:12 +02:00
helpers.rb Initial commit. 2011-03-30 20:31:39 -04:00
naming.rb Code cleanup 2013-12-08 21:51:43 +01:00
nodes.rb Add :only/:compound options to predicate_select, refactor ands/ors -> groupings 2011-06-05 14:29:54 -04:00
predicate.rb Maintain Ruby 1.8.7 syntax compatibility 2014-05-01 15:55:39 +02:00
ransacker.rb Maintain Ruby 1.8.7 syntax compatibility 2014-05-01 15:55:39 +02:00
search.rb Formatting cleanup, follow-up to #378. 2014-08-28 13:14:58 +02:00
translate.rb fix attribute translation for activerecord using STI having with both singular(one) and plural(other) translation keys 2014-09-22 15:38:37 +03:00
version.rb Version 1.4.1 2014-09-23 15:25:08 +02:00
visitor.rb Code cleanup 2013-12-10 10:52:46 +01:00