```ruby
class CommentsController < ApplicationController

  def new
    @comment = Comment.new
  end

end
```

Build comment off of resource in new comments action.
user
```ruby
class CommentsController < ApplicationController

  def new
    @resource = Resource.find_by(id: params[:resource_id])
    @comment = @resource.comments.build
  end

end
```
assistant