saved searches: paginate index page + add search form.

This commit is contained in:
evazion
2019-09-02 20:41:10 -05:00
parent 6ef79fe6ab
commit 4abffc7faa
3 changed files with 25 additions and 10 deletions

View File

@@ -3,11 +3,7 @@ class SavedSearchesController < ApplicationController
respond_to :html, :xml, :json, :js
def index
@saved_searches = saved_searches.order("id")
if params[:label]
@saved_searches = saved_searches.labeled(params[:label])
end
@saved_searches = saved_searches.search(search_params).paginate(params[:page], limit: params[:limit])
respond_with(@saved_searches) do |format|
format.xml do