we don't need this
This commit is contained in:
parent
6a914d4394
commit
c56177cd10
|
@ -1,6 +1,6 @@
|
||||||
class Notification < ActiveRecord::Base
|
class Notification < ActiveRecord::Base
|
||||||
belongs_to :recipient, class_name: 'User'
|
belongs_to :recipient, class_name: 'User'
|
||||||
belongs_to :target, :polymorphic => true
|
belongs_to :target, polymorphic: true
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def for(recipient, options={})
|
def for(recipient, options={})
|
||||||
|
|
|
@ -1,5 +1,2 @@
|
||||||
class Notifications::QuestionAnswered < Notification
|
class Notifications::QuestionAnswered < Notification
|
||||||
def linked_object
|
|
||||||
Answer.where(id: self.target_id).first
|
|
||||||
end
|
|
||||||
end
|
end
|
Loading…
Reference in New Issue