ruby - Rails, searchlogic choose categories with checkboxes -


I want to find some paintings. Each image is related to a single category. What do I want to do that adds multiple checkboxes to my search form, so that users can mark multiple categories. (With or join) Is it possible with search? The query that I am looking for is something like this:

  Select from the pictures where the category "white" or "red" like category ... f.check_box: Category (white) F.   "post-text" itemprop = "text"> 

Super Dopter is the easiest way to do this (your search object is to assume @search):

  f.check_box: category_equals_any, {: name = & gt; "Search [category_equals_any] []"}, "white" f.check_box: category_equals_any, {: name = & gt; "Search [category_equals_any] []"}, "black" f.check_box: category_equals_any, {: name = & gt; "Search [category_equals_any] []"}, "red" f.check_box: category_equals_any, {: name = & gt; "Search [category_equals_any] []"}, "green"  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -