Created
May 7, 2015 08:33
-
-
Save Agowan/aea01ae16466ec915490 to your computer and use it in GitHub Desktop.
carrier wave file
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
def data | |
@data ||= File.read pdf_template_path | |
end | |
def pdf_template_path | |
@tmp_path ||= @pdf_template.template.tap { |u| u.cache_stored_file! }.path | |
end | |
def cleanup | |
File.delete(pdf_template_path) if File.exist?(pdf_template_path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment