Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def index
- @save_to_paperclip_examples = SaveToPaperclipExample.all
- # Don't forget to reigster the xls/pdf mime types in config/initializers/mime_types.rb
- respond_to do |format|
- format.html
- format.xls { send_data Doc.create(:name => "example_xls", :document_content => render_to_string, :document_type => "xls") }
- format.pdf { send_data Doc.create(:name => "example_pdf", :document_content => render_to_string, :document_type => "pdf") }
- end
- end
Add Comment
Please, Sign In to add comment