Created
November 9, 2011 22:42
-
-
Save jnstq/1353394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TicketsController < ApplicationController | |
def index | |
@order = Order.paid.find_by_permalink!(params[:user_order_id]) | |
ticket_report = TicketReport.new | |
ticket_report.order = @order | |
respond_to do |format| | |
format.pdf do | |
send_data ticket_report.to_pdf, :filename => "Biljetter-#{@order.permalink}.pdf", | |
:type => "application/pdf", | |
:disposition => "attachment" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment