Single page Rails app -


I'm writing an image board like 4chan in the railing. This is my first rail app after going through Michael Hartl's train tutorial, and I'm not sure how to organize my controllers.

I have a controller for the post, and there is a controller for the pages, will you organize it? Do I need a page controller if I just have to do everything on one page?

The user does not have to present how this code affects your structure if it is a page ... you still need something to make that page

In your case, though, there will be a list of posts, so you do not need a separate controller.

Considering the structure of the rest, you will have:

  Posts Index - Post list of posts. Shows - posted a post. Create - create a post etc. Your index method becomes "single page" and it can accept filtering parameters and display the list of posts accordingly. 


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -