Created
September 24, 2013 13:29
-
-
Save rderoldan1/6684698 to your computer and use it in GitHub Desktop.
PDF Rendering using partials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h5>Mi partial content</h5> | |
<%= @object.some_attribute %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#action show | |
def show | |
@object = Model.firts | |
respond_to do |format| | |
format.html | |
format.pdf {render :pdf => "pdf_name} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= render "partial"%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= render :partial => "partial", :formats => [:html]%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool it worked great :) . But I'm not getting the logic what is _partail.html.erb. How all files are interacting.