parent
8ab4d9dc58
commit
e169f9e361
@ -1,4 +1,4 @@
|
||||
class Watcher < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :watchable, polymorphic: true
|
||||
end
|
||||
belongs_to :watchable, polymorphic: true, counter_cache: :watchers_count
|
||||
end
|
||||
|
@ -0,0 +1,5 @@
|
||||
json.identifier @repo.identifier
|
||||
json.praises_count @repo.project.praises_count
|
||||
json.forked_count @repo.project.forked_count
|
||||
json.watchers_count @repo.project.watchers_count
|
||||
json.partial! 'author', locals: { user: @repo.user }
|
Loading…
Reference in new issue