How can rails polymorphism be called in a page?

rails polymorphism problem:

I now have questions , articles , comments three models, one question corresponds to multiple comments , and a article corresponds to multiple comments . Now how to submit comments under question ?

my models is as follows:

Routing Error
uninitialized constant CommentsController

the main problem is this statement:

<%= form_for([@comment.commentable,@comment]) do |f| %>
The essence of

is <% = form_for ([@ question, @ comment]) do | f |% >
url: "/ questions/2/comments" (post request)
that is, you are adding comments to this question, you need a comments controller, and define the create method
, but you do not define

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36c67-2c046.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36c67-2c046.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?