I'm working on a porject that has the following design forums have posts which have comments. I am reading the ruby guidance http://ift.tt/2BrBH53 and it says to render an action template from another action I need to use something like this render "posts/index
.
I am trying to print all the posts of a forum in that forum. I have set the database and model but not sure how to deal with the controllers.
How can I call posts/index in the forums/show/i ( where i is the id of forum ).
How can I print the posts in the forum and how can I print only the posts that are related to that particular forum ?
Thanks for your time.
Aucun commentaire:
Enregistrer un commentaire