This is a tough one I think. I have a comments controller, that I'd like to use for all of my other controllers: such as books, titles, etc.
The problem is, the create action in comments is:
def create
@book = Book.find(params[:book_id])
@comment = @book.comments.create!(params[:comment])
respond_to do |format|
format.html {redirect_to @book}
format.js
end
end
so how can I use the action & comments controller for titles, if its clearly using books attributes?