-
Notifications
You must be signed in to change notification settings - Fork 76
Basic Filters
berk edited this page Apr 12, 2012
·
1 revision
Creating a basic filter is just a matter of adding the following lines of code to your controller:
class OrdersController < ApplicationController
def index
@orders = Order.filter(:params => params)
end
end
And adding a filter display tags to your page: (index.html.erb)
<%= will_filter_tag(@orders) %>
If you would like to display the will_filter table, you can add the following tag right below the filter tag: (index.html.erb)
<%= will_filter_table_tag(@orders) %>