We were already using it most of the time, but there were a few places were we used brackets for multiline blocks.
21 lines
441 B
Ruby
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
|