I'm new to Rails and I'm trying to create a standard CRUD rails application for displaying text posts. It's pretty similar to blog where I would like authenticated users to be able to edit and destroy posts while visitors to the site can just see and browse the existing posts.
I would like to know what is the best way to manage this. So far I've been using two controllers the first has a before_filter so that each route requires authentication and the associated views have edit/destroy/new links. The second controller has no authentication filter and the views don't have links to edit or destroy the posts.
This solution works, but I don't think it's very DRY. I have a feeling that if stick with this situation things will get more and more complicated as I add more functionality. Is there a better way to manage this? I'm sure it must be common problem.