educoder/app/models/watcher.rb

5 lines
136 B

6 years ago
class Watcher < ApplicationRecord
belongs_to :user
belongs_to :watchable, polymorphic: true, counter_cache: :watchers_count
end