users: replace scopes with associations.

This commit is contained in:
evazion
2019-08-29 16:00:06 -05:00
parent 8756480500
commit 9a3e9747d8
14 changed files with 24 additions and 79 deletions

View File

@@ -28,10 +28,6 @@ class UserFeedback < ApplicationRecord
where("category = ?", "negative")
end
def for_user(user_id)
where("user_id = ?", user_id)
end
def visible(viewer = CurrentUser.user)
if viewer.is_admin?
all