# Dynamic Filters with AJAX (like Redmine/Trac)

**URL:** <https://www.ruby-forum.com/t/dynamic-filters-with-ajax-like-redmine-trac/194477>\
**Category:** Rails\
**Created:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/dynamic-filters-with-ajax-like-redmine-trac/194477 "2010-09-06T16:39:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferblape](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/73ab20/32.png) [@ferblape](https://www.ruby-forum.com/u/ferblape)\
**Post date:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/dynamic-filters-with-ajax-like-redmine-trac/194477/1 "2010-09-06T16:39:39Z")

</div>

Hello G.s,

I have a model “Person” with lots of columns (date, int, string, so on)  
and  
right now I need to make a filter for my costumer.

My goal is something like this:  
[Issues - Redmine](http://www.redmine.org/projects/redmine/issues).  
Or, even better: [http://trac.edgewall.org/demo-0.12/query](http://trac.edgewall.org/demo-0.12/query).

The most interesting feature for me is to be able to choose different  
columns and to have customized options (LIKE or NOT LIKE for strings,  
BETWEEN … and … for dates, and so on)

Unfortunately, Redmine only allows 1 criteria per database column.  
Trac, on the other hand, accepts OR and AND, so I can make “complexes”  
searches, like:

something AND something AND something  
OR  
something else AND something else

That said, my questions are:

- Does anybody know anything (Gem, plugin or tutorial) that can help me  
on  
the backend or on the frontend? I am using jQuery and Rails 3.
- Is the new ActiveRecord Query API on Rails 3 complete enough to make  
this  
in a DRY way or should I use a specific Gem for searching (eg.  
searchlogic)?
- Is there any opensource Rails project with such a complete filter like  
Trac?
- Should I try to release it as a Gem when its done? 😃

Thanks in advance and please excuse my poor English 😛

–  
Fernando B.
