I have a nested route like so:
resources :apps do
resources :issues
end
the helper for seeing all issues related to an app is as follows:
app_issues_url(app)
but now I want to use a helper to point to a specific issue of a specific app like apps/1/issues/1 but i don't know how to use that helper. what is the helper for this url?
you can pass both instances to url helper like
app_issue_url(@app,@issue)
you can also use
app_issue_path(@app,@issue)
or
url_for([@app,@issue])
see rails doc for more info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With