In the past users could only follow apps if an admin did it for them.
But now users can follow and unfollow any apps. Following an app is no
longer like a permission to view that app.
class UserDestroy
def initialize(user)
@user = user
end
def destroy
App.watched_by(@user).each do |app|
watcher = app.watchers.where(user_id: @user.id).first
app.watchers.delete(watcher)
end
@user.destroy
end
end