check_box_tag and find condition
- by red
<%= check_box_tag('videos_count')%>
If this box is checked, the param will say "videos_count"="1" . In the controller I have this:
videos_count = params[:videos_count]
@cars = Car.paginate( :page => params[:page], :per_page => 10,
:conditions => ["videos_count = ?", videos_count],
when the box is checked I see the correct parameter in the server log, but the find returns all of the results instead of results with videos_count = 1.