Commit Graph

16 Commits

Author SHA1 Message Date
Tibor Nagy 9799982e06 Avoid order indication in separate line in sort_link. 2014-08-07 13:45:03 +02:00
Semenyuk Dmitriy b20e303d42 Bullet proof: don’t crash if blank string is passed to `SomeModel.search` method 2014-05-13 12:35:13 +06:00
Jon Atack 1abf8f6086 Maintain Ruby 1.8.7 syntax compatibility
since Rails 3.x stills supports Ruby 1.8.7 as per
http://guides.rubyonrails.org/v3.2.17/getting_started.html:
“Ruby language version 1.8.7 or higher.”
2014-05-01 15:55:39 +02:00
Ryoji Yoshioka a8f4a92b6c Add format option to search_form_for 2014-04-18 18:03:38 +09:00
jonatack 8df62abfba Code cleanup 2013-12-10 19:18:17 +01:00
jonatack 49c1e3134c Use Ruby 1.9 hash syntax 2013-08-04 15:13:41 +02:00
Andrew Premdas 3299f3aeaf Fixes #260 2013-07-25 16:13:22 +10: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