Hey I hope you can help me.
I am using rails 3 with the devise gem.
I am trying to find a way to let users only edit the posts/comments that they have created.
Should I add the CanCan gem for this or can I do it with devise? Or is there just a simple Active Record query possible?
Many thanks.
Devise creates a hash
current_user, which you can use in your controllers, models, and views. So it should be easy to create a check which does something like this: