From dd7ac8e64fba2377edf7313d96a33b86e20e0904 Mon Sep 17 00:00:00 2001 From: Pfingstfrosch Date: Sat, 16 May 2020 12:26:21 +0200 Subject: [PATCH] only select favorites which match the current user id --- app/controllers/favorites_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/favorites_controller.rb b/app/controllers/favorites_controller.rb index 0a426dc..f53bef6 100644 --- a/app/controllers/favorites_controller.rb +++ b/app/controllers/favorites_controller.rb @@ -1,7 +1,7 @@ class FavoritesController < ApplicationController def people - @favoritePeople = FavoritePerson.all + @favoritePeople = FavoritePerson.where('user_id': current_user.id) @host = 'https://tiss.tuwien.ac.at' end