Skip to content

Instantly share code, notes, and snippets.

@jasondew
Created July 13, 2010 15:11
Show Gist options
  • Select an option

  • Save jasondew/474007 to your computer and use it in GitHub Desktop.

Select an option

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