-
Notifications
You must be signed in to change notification settings - Fork 14
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
Navigation in My Scenarios is broken #4307
Comments
Keeping track of progressTLDR: I can't identify the issue exactly so far. By all accounts and the kaminari docs it should be working as is... From the first page the pagination links populate correctly. Generated Links: <nav class="pagination" role="navigation" aria-label="pager">
<span class="page current"> 1 </span>
<span class="page">
<a rel="next" href="/saved_scenarios/all?page=2">2</a>
</span> <span class="page">
<a href="/saved_scenarios/all?page=3">3</a> </span>
<span class="page"> <a href="/saved_scenarios/all?page=4">4</a> </span>
<span class="page"> <a href="/saved_scenarios/all?page=5">5</a> </span>
<span class="page gap">…</span> <span class="next"> <a rel="next" href="/saved_scenarios/all?page=2">Next ›</a> </span> <span class="last"> <a href="/saved_scenarios/all?page=514">Last »</a> </span> </nav> But then from any other page where there is a 'current page' parameter, the links all just link to the current page: Generated Links: <nav class="pagination" role="navigation" aria-label="pager">
<span class="first">
<a href="/saved_scenarios/all">« First</a>
</span> <span class="prev"> <a rel="prev" href="/saved_scenarios/all?page=3">‹ Prev</a> </span>
<span class="page"> <a href="/saved_scenarios/all">1</a>
</span> <span class="page"> <a rel="prev" href="/saved_scenarios/all?page=3">2</a>
</span> <span class="page current"> 3 </span> <span class="page">
<a rel="next" href="/saved_scenarios/all?page=3">4</a> </span>
<span class="page"> <a href="/saved_scenarios/all?page=3">5</a> </span>
<span class="page"> <a href="/saved_scenarios/all?page=3">6</a> </span>
<span class="page"> <a href="/saved_scenarios/all?page=3">7</a> </span>
<span class="page gap">…</span> <span class="next"> <a rel="next" href="/saved_scenarios/all?page=3">Next ›</a> </span> <span class="last"> <a href="/saved_scenarios/all?page=3">Last »</a> </span> </nav> The 'current page' is updating correctly as the :page param, so I don't really know what kaminari's problem is. I also tried updating the kaminari gem to 1.2.2 - this didn't break any spec but also didn't make any difference. I also tried adding a route: resources :saved_scenarios, except: %i[new] do
resource :feature, only: %i[show create update destroy], controller: 'featured_scenarios'
resources :users, controller: 'saved_scenario_users' do
member do
get :confirm_destroy
end
end
member do
get :load
put :discard
put :undiscard
put :publish
put :unpublish
put :restore
get :confirm_restore
end
collection do
get :discarded
get :all
end
get 'all(/page/:page)', action: :all, as: :all_saved_scenarios
get '/history' => 'saved_scenario_history#index'
put '/history/:scenario_id' => 'saved_scenario_history#update', as: :update_saved_scenario_history
get '/report/:report_name' => 'saved_scenario_reports#show'
end |
This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future. |
In the navigation pane of My Scenarios, I can switch to the second page. However, once I'm there, the navigation buttons do not give any response. I'm working in Google Chrome.
The text was updated successfully, but these errors were encountered: