Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README

  • Loading branch information...
commit 17a0bb1780a47191f04ff1f9dbb30de9bd800194 1 parent 3b1e23f
Jonathan Barket authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 README.md
8 README.md
View
@@ -2,7 +2,7 @@
facet_for is a collection of FormBuilder helpers that speed up the process of creating complex search forms with [Ransack](http://github.com/ernie/ransack).
-For many searches, it can be as simple as:
+For many searches, it can be as simple as adding this inside your ```search_form_for```:
```ruby
<%= f.facet_for(:field_name) -%>
@@ -39,6 +39,12 @@ Most of the Ransack predicates are supported:
As well as several special cases and meta-predicates specific to facet_for:
+#### Between
+
+By default, when passing a ```date``` or ```datetime``` column to facet_for, it will use the ```:type => :between``` predicate.
+
+Rather than generating a single field, ```:type => :between``` creates one ```:type => :lte``` and one ```:type => :gte``` field with a single label. This makes searching ranges of dates or numbers painless.
+
#### Collections
* Collection - ```:type => :collection```
Please sign in to comment.
Something went wrong with that request. Please try again.