I have the following routes:
Brand.all.each do |brand|
get "/#{brand.slug}", to: 'brands#index'#
end
That generates:
"/tommy"
"/lacoste"
"/gap"
But when I access /lacoste for example, the page has a pagination (kaminari or will-paginate). The pagination links are generated like this:
"/tommy?page=2
The paginate method always shows the first brand route generated.
How can I solve this ?
question from:https://stackoverflow.com/questions/65839202/rails-dynamic-route-with-pagination