Code Review

You might be able to get away with having a single action `comments` or `index` with a route like: `get '/comments/:type/:id'`

Then your controller method could look something like:

```ruby
def index
   commentable_type = params[:type]
   commentable_id = params[:id]
   @comments = Comment.where(commentable_type: commentable_type, commentable_id: commentable_id)
   render json: { commentable: { type: commentable_type, id: commentable_id, comments: @comments }
   # OR
   # render json: { comments: @comments }
end