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
I'm leveraging Rails collections to generate pretty URLs for some Active Record scopes and I'm pointing all of them to a single controller action to keep my controllers dry:
resources :pass_applications do
collection do
get :approved, to: 'pass_applications#collection'
get :submitted, to: 'pass_applications#collection'
get :canceled, to: 'pass_applications#collection'
get :denied, to: 'pass_applications#collection'
end
# ...
end
The Kaminari helpers generate links to whichever collection is at the top of the collection block and not current_page. If current_page is /pass_applications/submitted, I'd expect link_to_next_page to be /pass_applications/submitted?page=2, but it's actually /pass_applications/approved?page=2. All of the Kaminari helpers behave this way.
Am I trying to make Kaminari do something it wasn't designed to do or is this a bug?
The text was updated successfully, but these errors were encountered:
I'm leveraging Rails collections to generate pretty URLs for some Active Record scopes and I'm pointing all of them to a single controller action to keep my controllers dry:
The Kaminari helpers generate links to whichever collection is at the top of the collection block and not
current_page
. Ifcurrent_page
is/pass_applications/submitted
, I'd expectlink_to_next_page
to be/pass_applications/submitted?page=2
, but it's actually/pass_applications/approved?page=2
. All of the Kaminari helpers behave this way.Am I trying to make Kaminari do something it wasn't designed to do or is this a bug?
The text was updated successfully, but these errors were encountered: