Skip to content

Instantly share code, notes, and snippets.

@rderoldan1
Created September 24, 2013 13:29
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 rderoldan1/6684698 to your computer and use it in GitHub Desktop.
Save rderoldan1/6684698 to your computer and use it in GitHub Desktop.
PDF Rendering using partials
<h5>Mi partial content</h5>
<%= @object.some_attribute %>
#action show
def show
@object = Model.firts
respond_to do |format|
format.html
format.pdf {render :pdf => "pdf_name}
end
end
<%= render "partial"%>
<%= render :partial => "partial", :formats => [:html]%>
@Bindushree
Copy link

Cool it worked great :) . But I'm not getting the logic what is _partail.html.erb. How all files are interacting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment