README.md in forty_facets-0.1.1 vs README.md in forty_facets-0.1.2
- old
+ new
@@ -65,10 +65,12 @@
facet [:studio, :country], name: 'Country' # generate a filter several belongs_to 'hops' away
orders 'Title' => :title,
'price, cheap first' => "price asc",
'price, expensive first' => {price: :desc, title: :desc}
+ custom :for_manual_handling
+
end
def index
@search = MovieSearch.new(params) # this initializes your search object from the request params
@movies = @search.result.paginate(page: params[:page], per_page: 5) # optionally paginate through your results
@@ -122,9 +124,10 @@
| text | prefix:true | creates a filter to limit search result to entities containing the filter value in the given field |
| scope | | creates a filter to limit search result to entities matching the scope with the given name |
| facet | | creates a facetted filter on the specified model attribute (attribute or belongs_to) |
| range | | creates a range filter (param format 'FROM - TO') limiting result to entities with values in that range |
| orders | | takes a hash mapping a label to an argument that the active record `order` method can be called with to sort the result |
+| custom | | doesnt affect the query directly, just handles the request param. access via @search.filter(:custom_filter).set(..) /@search.filter(:custom_filter).value |
## FAQ
### What kind of associations can be searched/filtered for?