I currently authenticate that users can edit their own content only by:
@posts = current_user.posts.find(params[:id])
Is there an easier way to do this across all controllers?
I have a before_filter that requires a user must be logged in, but it doesn't check who the individual user is.
I'm wondering if there is a more elegant solution that would just require one edit to the before_filer method rather than putting a current_user method before every model that needs protecting.