Files
grecia/app/controllers/admin/comments_controller.rb
Javi Martín 70a07c095f Add and apply Style/BlockDelimiters rubocop rule
We were already using it most of the time, but there were a few places
were we used brackets for multiline blocks.
2019-10-05 14:44:14 +02:00

21 lines
441 B
Ruby

class Admin::CommentsController < Admin::BaseController
include DownloadSettingsHelper
def index
@comments = Comment.sort_by_newest.page(params[:page])
respond_to do |format|
format.html
format.csv do
send_data to_csv(Comment.sort_by_newest, Comment),
type: "text/csv",
disposition: "attachment",
filename: "comments.csv"
end
end
end
end