Hello Rails community!
I’m currently designing a rails based website for my school’s magazine
and since I have the ability to start from scratch I decided to start
learning rails. Which may or may not have been a silly idea :).
However, very early on I’ve encountered an issue with how I should set
up the site. Currently there are separate sections involving (for
example),
Stories
Editor’s Blogs
Podcasts
Videos
Etc.
All able to be commented on, etc. So it’s going to be a community
based site for my campus.
The question I have though, is should there be a separate controller
for each of the sections? Or one over all controller that handles all
incoming content?
Sorry if this is a basic question, I’ve done some searching but I
haven’t been able to come up with much in regard to this. If there’s
some resource that covers this in more depth (ie: multiple content
type postings) I’d love to read into it. Otherwise,
Thanks for your time and input on the matter!
Justin
Make separate controllers. And have a look at acts_as_commentable
plugin
Maybe it’s that you want to take this opportunity to learn
programming, but I was thinking about your list of services you want
to provide. Personally, I don’t think I would even build an
application at all. There are plenty of other out-of-box solutions to
accomplish all those goals:
Stories - A wiki could handle this nicely.
Blogs - Any one of dozens of bloggers could take care of this.
Podcasts - Blogs with audio files
Videos - Blogs with video files attached.
All of the above already handle comments. Granted, maybe your
application will provide more that what is listed here, but if not
then I don’t see the need to reinvent this wheel.
The plan is to expand this out to much more than a simple news
aggregation system, but into a system to where editors can assign
stories, track writers progress, and eventually act as a system for
online deployment.
Much of this probably could be done with already available materials,
however I am using it as a chance to learn ruby and to set up the
paper with a nice full featured website. They have a current system
deployed, but it’s riddled with problems (Mostly coming from 4
different people working with php all at differing times).
However, I did seriously consider your suggestion when I started to
work on this project