0

I'm building a platform for my personal site so I can post different types of content to my own feed:

  • Posts
  • Videos
  • Journals
  • Projects
  • Clients
  • Life Events
  • Photography
  • Music

How should I structure this application? Should I use the Rails generate command, if so, should I create a model/controller for each type of content? How should I structure the MVC portion of my app?

1 Answer 1

4

I think a good start is to create resource using scaffolding for each type of content. This way you have quickly your application working, and you can start creating some data.

Next you can remove the code generated by the scaffolfding that you dont want to use, and start creating the core part of your site (add new Controllers or add actions to the existing ones).

Sign up to request clarification or add additional context in comments.

3 Comments

Should I generate an entire scaffold for my homepage as well? Or just a controller.
Resources scaffolding generate actions to create/update/delete objects. The homepage is not a resource, so just a controller is needed.
Thanks for your help! Upon doing a bit of research, running the rails generate scaffold command for each content type produces many different tables wit duplicate columns. A computer scientist and/or application design expert would argue you should run rails generate scaffold Content with all the fields you need for each content type and an additional type field that tells wether it's a post, video, journal, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.