Я думаю, что вы ищете ресурсы вместо совпадения ...
resources :recipes do
resources :ingredients
end
дает вам:
recipe_ingredients GET /recipes/:recipe_id/ingredients(.:format) {:action=>"index", :controller=>"ingredients"}
recipe_ingredients ingredient /recipes/:recipe_id/ingredients(.:format) {:action=>"create", :controller=>"ingredients"}
new_recipe_ingredient GET /recipes/:recipe_id/ingredients/new(.:format) {:action=>"new", :controller=>"ingredients"}
edit_recipe_ingredient GET /recipes/:recipe_id/ingredients/:id/edit(.:format) {:action=>"edit", :controller=>"ingredients"}
recipe_ingredient GET /recipes/:recipe_id/ingredients/:id(.:format) {:action=>"show", :controller=>"ingredients"}
recipe_ingredient PUT /recipes/:recipe_id/ingredients/:id(.:format) {:action=>"update", :controller=>"ingredients"}
recipe_ingredient DELETE /recipes/:recipe_id/ingredients/:id(.:format) {:action=>"destroy", :controller=>"ingredients"}
recipes GET /recipes(.:format) {:action=>"index", :controller=>"recipes"}
recipes ingredient /recipes(.:format) {:action=>"create", :controller=>"recipes"}
new_recipe GET /recipes/new(.:format) {:action=>"new", :controller=>"recipes"}
edit_recipe GET /recipes/:id/edit(.:format) {:action=>"edit", :controller=>"recipes"}
recipe GET /recipes/:id(.:format) {:action=>"show", :controller=>"recipes"}
recipe PUT /recipes/:id(.:format) {:action=>"update", :controller=>"recipes"}
recipe DELETE /recipes/:id(.:format) {:action=>"destroy", :controller=>"recipes"}
поэтому ваше действие редактирования становится:
<%= link_to 'Edit Ingredient', edit_recipe_ingredient_path(@ingredient.recipe, @ingredient) %>
и действие шоу становится:
<%= link_to 'Edit Ingredient', [@ingredient.recipe, @ingredient] %>
В противном случае вам придется сделать что-то вроде:
<%= link_to 'Edit Ingredient', :controller => :ingredients, :action => :show, :id => @ingredient.id, :recipe_id => @ingredient.recipe %>