Skip to content

Instantly share code, notes, and snippets.

@jasondew
Created July 13, 2010 15:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jasondew/474007 to your computer and use it in GitHub Desktop.
Save jasondew/474007 to your computer and use it in GitHub Desktop.
class Controller < ApplicationController
def show
@transaction_record = TransactionRecord.find(...)
respond_to do |wants|
wants.html
wants.pdf { send_data @transaction_record.pdf }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment