adds counter cache for user's notifications
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Notification < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
belongs_to :user, counter_cache: true
|
||||
belongs_to :notifiable, polymorphic: true
|
||||
|
||||
scope :unread, -> { all }
|
||||
|
||||
Reference in New Issue
Block a user