diff --git a/app/models/notification.rb b/app/models/notification.rb index 20e9ebfe..0c681579 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -1,6 +1,6 @@ class Notification < ActiveRecord::Base belongs_to :recipient, class_name: 'User' - belongs_to :target, :polymorphic => true + belongs_to :target, polymorphic: true class << self def for(recipient, options={}) diff --git a/app/models/notifications/question_answered.rb b/app/models/notifications/question_answered.rb index 15b2cadf..f93ffd45 100644 --- a/app/models/notifications/question_answered.rb +++ b/app/models/notifications/question_answered.rb @@ -1,5 +1,2 @@ class Notifications::QuestionAnswered < Notification - def linked_object - Answer.where(id: self.target_id).first - end end \ No newline at end of file