No route matches {:action=>“index”, :contactable_type=>“Lead”, :controller=>“events”, :id=>3, :page=>2}
Closed this issue · 1 comments
JohnMerlino1 commented
I am loading the following show page:
http://localhost:3000/contacts/3?contactable_type=Lead
I have a few tables on this show page related to the specified contact, including related events. Hence, I want to display those tables with pagination on that page, but when I do the following:
<%= will_paginate(FullcalendarEngine::Event.paginate(:page => 1, :per_page => 10), params: { controller: 'events', action: :index }) %>
I get the following error:
No route matches {:action=>"index", :contactable_type=>"Lead", :controller=>"events", :id=>3, :page=>2}
I provide more details here: http://stackoverflow.com/questions/38533998/why-does-this-routing-error-occur
How can I resolve this?
mislav commented
I think you wanted action: "show"
instead of action: "index"
. But without seeing any of your routes configuration, I can't tell where the problem is.
Closing because I'm assuming that you've figured out the routing problem in the meantime 😉