Proper routing language

I need help figuring out how to turn the information from 'rake routes' into the correct path to use with <%= link_to %>.

I have tried everything I know and spent hours trying to research this. I've read the Ruby documentation and I'm just getting more confused. I know this is a simple fix but it has completely eluded me.

<li><%= link_to 'Company Dash', tenant_corp_path(tenant_id:, corp_id: params[:corp_id]) %></li>

Rake routes show the tenant_corp_path GET as follows: /tenants/:tenant_id/corps/:id(.:format).

How do I properly turn that into a tenant_corp_path statement?


1 Likes1.35 GEEK