Example:
User A (id=10) has created a photo resource
photo: (id: 1 user_id = 10, url: \"http://...\")
In your PhotosController:
before_filter :require_permission, only: :edit def require_permission if current_user != Photo.find(params[:id]).user redirect_to root_path #Or do something else here end end