I'm using Ruby on rails with devise. I generated a scaffold.
tasks_controller.rb:
def index
@tasks= current_user.tasks
end
By using this, I'm able to show the people only what they have created, but other users can see the data of tasks that they have not entered, like:
GET /tasks/1
GET /tasks/2
Although the tasks with id 1 is not created by the current_user
, the user can access that.