# Model class Searchable cattr_accessor :conditions named_scope :filtered, lambda{{:conditions => conditions}} end # Controller def index if params[:conditions] Searchable.conditions = params[:conditions] @searchables = Searchable.filtered else @searchables = Searchable.all end end # View <% for searchable in @searchables %> <%= Searchable.content %> <% end %> <%= link_to "Show only cool items", :action => :index, :conditions => ['cool= ?',true] %>