run rake routes and check if there are any routes that indicate the action of your controller. If not, you need to create it either as a "member action" or using a matching rule.
If you see a route, you can name it by passing the parameter: as => route_name to the routing rule. This will allow the use of the route_name_path () and route_name_url () attributes for your link_to
RailsCasts has a good rails 3 routing syntax brief here
EDIT:
based on code examples, try the following:
<%= link_to 'Execute Comment', execute_post_comment_path(comment.post, comment) %>
According to the docs here, the parameter :method can only contain valid http verbs (get, put, post, delete). The link_to helper cannot decide which action you want to hit with the custom action of the element, so you need to use a named route as described above.
NTN
source share