Let's say we have users, posts, and comments.
I figured that in order to show a list of posts from a user, I'd have
to nest it.
All good, I figured it out without too much trouble, but then after a
while I started to get confused. Where would I place comments if I
want it to be nested under posts? Nest it 2 levels down? I hear it's
best to keep it only one level, so I'm not sure the best route to take
for this type of setup.
If anyone could give some feedback on that, I'd really appreciate it.
Next, how would I take care of the 'admin' side of things RESTfully?
1) How could I specify a user to be an admin, "virtually" (without a
field in the database) I saw something like this in the environment.rb
2) Should there be a completely different admin "abstract" controller?
That doesn't make much "DRYness" sense to me, so I think I could use
the same controllers as any other, but restrict the actions to only an
admin with a before filter or something?
So if anyone could give some feedback on these two RESTful problems,
I'd really appreciate it.
p.s: if anyone knows RSpec pretty well, could you help me understand
why my posts_spec is blowing up with this restful routes stuff?