Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Premdas c795a856a2 #sort_link no longer removes params 2013-07-22 14:33:06 +01:00
Eric Guo 6683b85240 Fix search_form_for fail to assign new :class and :id in options, so now search_form_for works with Bootstrap. 2012-06-05 23:08:16 +08:00
Ryan Bigg 31a9cc9af8 Don't attempt to use routing_proxy if context does not respond to the routing_proxy method
Fixes failing build #29
2012-04-11 16:35:54 -04:00
Marek Hulan 9a71cbf8b8 Added custom search param key feature refs #43
Including specs. I didn't find any other sane place where a behaviour
should be changed. I don't understand why you define :q in
Ransack::Naming::Name so I ignored it. Still seems to work pretty good
in sort_link helper.

Enabled global search_key configuration refs #81

You can configure new default search key parameter
(default is still :q). Specs are included as well.

New functionality is documented in README.md

I also removed my specifis lines from .gitignore.
2012-04-11 14:29:30 -04:00
Ryan Bigg 2856ac6343 Added custom search param key feature refs #43
Merges in #81
2012-04-11 11:58:27 -04:00
Ryan Bigg f3da0b529f Must explicitly call routing proxy method to get access to routes for engines.
Cannot simply pass :use_route => :engine_name to params.
2012-04-02 15:13:54 -05:00
Ryan Bigg 25ba7e3a8f Add ability to use a named route when using sort_link
For example,

sort_link [:engine, Engine::Model.search]

Will use the engine's routing to determine where the route should go. The :engine symbol here should be the name of your engine, i.e. the engine_name setting which generally defaults to the downcased version of your engine's module.

Addresses problem discussed in #84.
2012-03-29 08:01:22 -05:00
Ernie Miller f6973b3a3b Initial work on sort_link. Mostly ported from MetaSearch, changes coming soon 2011-08-13 16:36:40 -04:00
Ernie Miller cef7b8ecea Workaround for 3.0 not having param_key and fix valid? on attr/sort 2011-04-18 13:59:47 -04:00
Ernie Miller 294015309b Initial commit. 2011-03-30 20:31:39 -04:00