Since you're just looking for various ways to achieve this. I thought I'd start an answer based on the comments to show the various ways I've tried that work for me.
The desired format is:
"/potatos/:id/foo" # :id refers to potato id
Outside of the resources block
If you do not need a nested route in your routes.rb you can achieve This can be achieved by creating a custom route outside of the resources block.
# routes.rb
# Custom routes
get '/potatos/:id/foo', to: 'foo#foo'
# Resources
resources :potatos
Rake routes shows:
GET potatos/:id/foo(.:format) foo#foo
I personally like this format as it allows me to see whats a typical resource and what I've added on. That said, I know the OP needs to follow a predefined style guide and needs it in the resources block (based on comment).
Inside of the resources block
If you need this done inside of the resources block, so far I've found adding a member route to a different controller#action to work for me in a simple app.
resources :potatos do
member do
get "foo", to: "foo#foo"
end
end
Or a simplified version if you only have one member.
resources :potatos do
get "foo", to: "foo#foo", on: :member
end
both show the following when I rake routes:
foo_potatos GET /potatos/:id/foo(.:format) foo#foo
However, the OP recieves an error when trying this format, but in my testing it works fine.