app/controllers/logins_controller.rb
def change_results_per_page
    session[:results_per_page] = params[:results_per_page]
    referring_page = request.referer
    flash[:notice] = t(:results_per_page) + " #{params[:results_per_page]}"
    if referring_page
      if referring_page.index("page=")
        referring_page = referring_page[0..(referring_page.index("page=") + 4)] + "1"
      end
      redirect_to referring_page
    else
      redirect_to home_pages_path
    end
  end
# Changes the number of results that are displayed per page. Redirects to first page if referring
# page was paginated. Redirects to previous page if page was not paginated. Redirects home if 
# no referring page.  
Changes the number of results that are displayed per page. Redirects to first page if referring
page was paginated. Redirects to previous page if page was not paginated. Redirects home if
no referring page.
Changes the number of results that are displayed per page . Redirects to first page if referring page was paginated . Redirects to previous page if page was not paginated . Redirects home if no referring page .
def change_results_per_page
    session[:results_per_page] = params[:results_per_page]
    referring_page = request.referer
    flash[:notice] = t(:results_per_page) + " #{params[:results_per_page]}"
    if referring_page
      if referring_page.index("page=")
        referring_page = referring_page[0..(referring_page.index("page=") + 4)] + "1"
      end
      redirect_to referring_page
    else
      redirect_to home_pages_path
    end
  end
def change_results_per_page session [ :results_per_page ] = params [ :results_per_page ] referring_page = request . referer flash [ :notice ] = t ( :results_per_page ) + " #{params[:results_per_page]}" if referring_page if referring_page . index ( "page=" ) referring_page = referring_page [ 0 .. ( referring_page . index ( "page=" ) + 4 ) ] + "1" end redirect_to referring_page else redirect_to home_pages_path end end
Changes the number of results that are displayed per page.
Changes the number of results that are displayed per page .