<% @roles.each do |role| %> <%#= link_to role.title, url_for(:filter => @filter, :new_filter => {:type => 'role', :id => role.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small #{is_filter_active?('role', role.id)}" %> <%= link_to role.title, url_for(:at=>params[:at],:filter => @filter, :new_filter => {:type => 'role', :id => role.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small #{' active' if (@filter['role'].include?(role.id) rescue nil)}" %> <% end %> <%= render :partial => 'clear_filters', :locals => {:type => 'role'} %>