Skip to content
Snippets Groups Projects

Add redaction and history limiting

8 files
+ 62
10
Compare changes
  • Side-by-side
  • Inline

Files

@@ -6,7 +6,8 @@ class PostHistoryController < ApplicationController
@@ -6,7 +6,8 @@ class PostHistoryController < ApplicationController
return not_found
return not_found
end
end
@history = PostHistory.where(post_id: params[:id]).includes(:post_history_type, :user, post_history_tags: [:tag])
@history = PostHistory.where(post_id: params[:id]).visible(current_user)
 
.includes(:post_history_type, :user, post_history_tags: [:tag])
.order(created_at: :desc).paginate(per_page: 20, page: params[:page])
.order(created_at: :desc).paginate(per_page: 20, page: params[:page])
render layout: 'without_sidebar'
render layout: 'without_sidebar'
end
end
Loading