> Do you mean you pass a value to an instance variable in the relevant > controller action, and then this is used then next time the page is > rendered? > And maybe you are using Javascript to read the values from the select > option, and passing this to the instance variable?
Yes in the controller action, no to javascript. @filter = params[:filter_name] in the view, the default filter code should select the previous value but sometimes it doesn't work depending on how you pass the options. if it's not working the way I want, I just define my own filter tag and use that method. not very DRY, but not too bad either > I'm guessing with this one you mean that the filter selects a new page > to render with each option?, using a different controller action for > each drop down select? yeah, different controller actions index_action, :active, :conditions => "state = 'active'" index_action, :inactive, :conditions => "state = 'inactive'" etc. You can use the filter code or if the list is small I usually just use links above/below the table. Also, if you have a lot of custom view code (though it's the same between each filter) you don't have to make a new file for each action, just have the actions render :action => :index -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
