I created a new route, like this:
resources :animals do
member do
get ':id/resumed_rep_life', :action => 'resumed_rep_life'
end
end
match '/animals/:id/resumed_rep_life' => "animals#resumed_rep_life"
How can I made a link for it?
I tried resumed_rep_life_animal_path(animal) but it does not work (method not found).
Are my routing correct?
Change this line:
match '/animals/:id/resumed_rep_life' => "animals#resumed_rep_life"
to this:
match '/animals/:id/resumed_rep_life' => "animals#resumed_rep_life", :as => 'resumed_rep_life_animal'
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