diff --git a/app/models/user.rb b/app/models/user.rb index 0ae4d3290..71db4ee2e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -36,17 +36,6 @@ class User < ActiveRecord::Base scope :officials, -> { where("official_level > 0") } scope :for_render, -> { includes(:organization) } - after_update :touch_debates, :touch_comments - after_touch :touch_debates, :touch_comments - - def touch_debates - debates.map(&:touch) - end - - def touch_comments - comments.map(&:touch) - end - def self.find_for_oauth(auth, signed_in_resource = nil) # Get the identity and user if they exist identity = Identity.find_for_oauth(auth) diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 239ce50f8..a84aebb63 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -1,4 +1,4 @@ -<% cache [locale_and_user_status, comment, @commentable, (@comment_flags[comment.id] if @comment_flags)] do %> +<% cache [locale_and_user_status, comment, @commentable, comment.author, (@comment_flags[comment.id] if @comment_flags)] do %>