Gestionnaire: add unfollow method

This commit is contained in:
Simon Lehericey 2017-10-05 14:10:49 +02:00
parent 01da457ad0
commit 19b3416361
3 changed files with 19 additions and 1 deletions

View file

@ -40,6 +40,10 @@ class Gestionnaire < ActiveRecord::Base
followed_dossiers << dossier
end
def unfollow(dossier)
followed_dossiers.delete(dossier)
end
def follow?(dossier)
followed_dossiers.include?(dossier)
end