From 82d2a806da8157954b8c58b41f769b5d1825efa5 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Thu, 29 Mar 2012 10:50:36 -0400 Subject: [PATCH] Credit where credit is due. Thanks @radar! --- README.md | 21 +++++++++------------ ransack.gemspec | 6 +++--- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 721e0a9..71cfd0a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ greatly from MetaSearch, and _backwards compatibility is not a design goal._ Ransack enables the creation of both simple and [advanced](http://ransack-demo.heroku.com) search forms against your application's models. If you're looking for something that simplifies query generation at the model or controller layer, you're probably not looking -for Ransack (or MetaSearch, for that matter). Try +for Ransack (or MetaSearch, for that matter). Try [Squeel](http://metautonomo.us/projects/squeel) instead. ## Getting started @@ -49,7 +49,7 @@ requires very little setup effort. If you're coming from MetaSearch, things to note: 1. The default param key for search params is now `:q`, instead of `:search`. This is - primarily to shorten query strings, though advanced queries (below) will still + primarily to shorten query strings, though advanced queries (below) will still run afoul of URL length limits in most browsers and require a switch to HTTP POST requests. 2. `form_for` is now `search_form_for`, and validates that a Ransack::Search object @@ -59,7 +59,7 @@ If you're coming from MetaSearch, things to note: the ActiveRecord adapter) via a call to `Search#result`. If passed `:distinct => true`, `result` will generate a `SELECT DISTINCT` to avoid returning duplicate rows, even if conditions on a join would otherwise result in some. - + Please note that for many databases, a sort on an associated table's columns will result in invalid SQL with `:distinct => true` -- in those cases, you're on your own, and will need to modify the result as needed to allow these queries to work. Thankfully, @@ -85,7 +85,7 @@ In your view: `cont` (contains) and `start` (starts with) are just two of the available search predicates. See Constants for a full list. - + ### Advanced Mode "Advanced" searches (ab)use Rails' nested attributes functionality in order to generate @@ -108,10 +108,10 @@ This means you'll need to tweak your routes... index render :index end - + ... and update your `search_form_for` line in the view ... - <%= search_form_for @q, :url => search_people_path, + <%= search_form_for @q, :url => search_people_path, :html => {:method => :post} do |f| %> Once you've done so, you can make use of the helpers in Ransack::Helpers::FormBuilder to @@ -122,16 +122,13 @@ construct much more complex search forms, such as the one on the ## Contributions -If you'd like to support the continued development of Ransack, please consider -[making a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=48Q9HY64L3TWA). +To support the project: -To support the project in other ways: - -* Use Ransack in your apps, and let me know if you encounter anything that's broken or missing. +* Use Ransack in your apps, and let us know if you encounter anything that's broken or missing. A failing spec is awesome. A pull request is even better! * Spread the word on Twitter, Facebook, and elsewhere if Ransack's been useful to you. The more people who are using the project, the quicker we can find and fix bugs! ## Copyright -Copyright © 2011 [Ernie Miller](http://twitter.com/erniemiller) \ No newline at end of file +Copyright © 2011 [Ernie Miller](http://twitter.com/erniemiller) diff --git a/ransack.gemspec b/ransack.gemspec index 82b6a11..4be8dfd 100644 --- a/ransack.gemspec +++ b/ransack.gemspec @@ -6,9 +6,9 @@ Gem::Specification.new do |s| s.name = "ransack" s.version = Ransack::VERSION s.platform = Gem::Platform::RUBY - s.authors = ["Ernie Miller"] - s.email = ["ernie@metautonomo.us"] - s.homepage = "http://metautonomo.us/projects/ransack" + s.authors = ["Ernie Miller", "Ryan Bigg"] + s.email = ["ernie@erniemiller.org", "radarlistener@gmail.com"] + s.homepage = "http://erniemiller.org/projects/ransack" s.summary = %q{Object-based searching for ActiveRecord (currently).} s.description = %q{Ransack is the successor to the MetaSearch gem. It improves and expands upon MetaSearch's functionality, but does not have a 100%-compatible API.}