hi!
I'm doing a blog engine in rails 2. I used the restful resources approach to create my initial 'post' and 'comment' models, and it is working very nice.
However, I'm stuck with two problems, and I want to resolve them with the "Rails way"
* How to disable some verbs from the restful interface?
You know, people should not be able to POST or DELETE on my blog posts. However, it doesn't seem pretty to me to go to the PostController and simply delete those methods, because the routes still appear and can be called (resulting in a beautiful error). How should I deal with this? Should I change the methods to return an error instead?
* How to make an admin area and keep DRYing?
After creating all my models, I now need an Admin area just to simple scaffold, creating posts and comment approval. But how do I do this and keep DRY? On one hand, I want to keep the admin area under the '/admin' prefix. But on the other hand, I don't know how can I keep using the created resources without repeating myself! Please, what is the "Rails way" of doing this thing?
On the ideal world, I put filters in my resources, limiting the admin operations to the admin users, and the /admin namespace somewhat maps/points to those resources instead... Please help me clarifying my mind
Cheers, RĂşben