Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class TimeEntryReportsController < ApplicationController
def index
@time_entry_report = TimeEntryReport.new(params[:time_entry_report])
respond_to do |f|
f.html do
@assets = @time_entry_report.assets.page(params[:page])
end
f.csv do
send_data @time_entry_report.to_csv, type: "text/csv", disposition: 'inline'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment