Fix the build - take 2.

b0e3062fdf
This commit is contained in:
Vinoth Kannan 2019-12-05 19:36:52 +05:30
parent b0e3062fdf
commit 754e1238b0
1 changed files with 4 additions and 11 deletions

View File

@ -147,7 +147,6 @@ class Notification < ActiveRecord::Base
# Be wary of calling this frequently. O(n) JSON parsing can suck.
def data_hash
@data_hash ||= begin
return {} if data.blank?
parsed = JSON.parse(data)
@ -155,7 +154,6 @@ class Notification < ActiveRecord::Base
parsed.with_indifferent_access
end
end
def url
topic.relative_url(post_number) if topic.present?
@ -232,11 +230,6 @@ class Notification < ActiveRecord::Base
Post.where(topic: topic_id, post_number: post_number).pluck_first(:id)
end
def reload(options = nil)
super
@data_hash = nil
end
protected
def refresh_notification_count