FIX code bug
This commit is contained in:
parent
908cda56f3
commit
d07543111a
|
@ -6,7 +6,7 @@ module Watchable
|
||||||
has_many :watcher_users, through: :watchers, source: :user, validate: false
|
has_many :watcher_users, through: :watchers, source: :user, validate: false
|
||||||
|
|
||||||
scope :watched_by, -> (user_id) { includes(:watchers).where(watchers: { user_id: user_id }) }
|
scope :watched_by, -> (user_id) { includes(:watchers).where(watchers: { user_id: user_id }) }
|
||||||
scope :following, -> (user_id) { watched_by }
|
scope :following, -> (user_id) { watched_by(user_id) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def watched?(watchable)
|
def watched?(watchable)
|
||||||
|
|
Loading…
Reference in New Issue