Skip to content

Instantly share code, notes, and snippets.

@bogdan
Created March 5, 2014 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan/9369197 to your computer and use it in GitHub Desktop.
Save bogdan/9369197 to your computer and use it in GitHub Desktop.
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