on a different note, you might want to change the following
base_route "/articles", Article do
base_route "/:article_id/add_comment", Comment do
post :add_comment
end
end
to
base_route "/articles", Article do
base_route "/:article_id/comments", Comment do
post :add_comment
end
end
this would result in an url POST /api/articles/:id/comments for creating comments instead of POST /api/articles/:id/add_comments.
More than following some established conventions for the URLs, having the base_route as /:article_id/comments allows you to nest other actions like read :get_comment_by_id and get meaningful URLs. Otherwise as per your existing setup, a nested url to read comment would be GET api/articles/:article_id/add_comments/:id which is not meaningful.






















