berk / will_filter

rails engine plugin for filtering active_record model objects
MIT License
157 stars 76 forks source link

500 error with 'is filtered by' #16

Closed tonymarschall closed 12 years ago

tonymarschall commented 12 years ago

If i try to filter on Id with is filtered by i got an 500 error. Saved and default filters exist.

Completed 500 Internal Server Error in 30ms
  ActionView::Template::Error (undefined method `sql_conditions' for nil:NilClass):
      35:   <% end %>
      36: 
      37:   <div id="wf_debugger" class="debugger" style="display:none;">
      38:       <%= raw(wf_filter.debug_sql_conditions) %>
      39:   </div>
      40: 
      41: </div>
    will_filter (3.1.6) lib/will_filter/containers/filter_list.rb:52:in `sql_condition'

# Setup
class TasksController < ApplicationController
  def index
    @tasks = Task.filter(:params => params)
  end
end

<%= will_filter_tag(@tasks) %>
<%= will_filter_table_tag(@tasks) %>
berk commented 12 years ago

Thank you for catching this. It should be working now.

tonymarschall commented 12 years ago

thanks, its working now.