-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paging request sent to wrong route in Rails 3.2 app search #386
Comments
Should't @results_url be = search_results_engine_configs_path instead of '
|
@emclab Did you solve your problem? It's probably a routing issue in your app, and most likely not a bug with will_paginate. |
When performing search on engine_config table, the first page of the search result is properly displayed. However when clicking 2nd page on the search output page, there is an error:
It seems that the controller routes to the action show to display the 2nd page. The controller should route to #search_results instead of #show and we don't why the controller does that.
Here is our routes definition in routes.rb:
In the engine configs' controller, the action search and search_results are defined as:
The search results is stored in
@s_s_results_details.models
which add pagination withmodels.page(params[:page]).per_page(max_pagination)
. Gem will_paginate 3.0.4 is used in the app.Is it a bug in will_paginate? Or something wrong with the code.
The text was updated successfully, but these errors were encountered: