You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
ActiveRecord::RecordNotFound in OnboardDataUploadx::EngineConfigsController#show
Couldn't find OnboardDataUploadx::EngineConfig with id=search_results
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.
In the engine configs' controller, the action search and search_results are defined as:
defsearch#display the page to set search parameters@model,@search_stat=search_(params)@results_url='search_results_engine_configs_path'enddefsearch_results#come out with search results set above@s_s_results_details=search_results_(params,@max_pagination)end
The search results is stored in @s_s_results_details.models which add pagination with models.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:
Should't @results_url be = search_results_engine_configs_path instead of '
search_results_engine_configs_path'? (With no quotes)
El 13/06/2014 21:59, "emclab" [email protected] escribió:
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:
ActiveRecord::RecordNotFound in
OnboardDataUploadx::EngineConfigsController#show
Couldn't find OnboardDataUploadx::EngineConfig with id=search_results
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:
resources :engine_configs do
collection do
get :search
put :search_results
end
end
In the engine configs' controller, the action search and search_results
are defined as:
def search #display the page to set search parameters @modelhttps://github.com/model, @search_stat = search_(params)
@results_url = 'search_results_engine_configs_path'
end
def search_results #come out with search results set above
@s_s_results_details = search_results_(params, @max_pagination)
end
The search results is stored in @s_s_results_details.models which add
pagination with models.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.
—
Reply to this email directly or view it on GitHub #386.
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: