Skip to content

Instantly share code, notes, and snippets.

@illbzo1
Created April 23, 2014 19:03
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 illbzo1/11228349 to your computer and use it in GitHub Desktop.
Save illbzo1/11228349 to your computer and use it in GitHub Desktop.
Adding some code to a view file for generating a PDF using DocRaptor.
<%= show_for @random do |s| %>
<%= s.attribute :title %>
<% end %>
<%= link_to 'Edit', edit_random_path(@random) %> |
<%= link_to 'Back', randoms_path %>
<%= link_to("Download Random PDF", random_path(@random, format: :pdf)) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment