Created
June 11, 2012 06:12
-
-
Save ajcubeta/2908704 to your computer and use it in GitHub Desktop.
Helper methods cause error when binding to ERB template using wicked_pdf
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
I included this 3 (RedCloth, ApplicationHelper, ActionView::Helpers) in my module class named PdfGenerate. | |
Followed some snippets from David at https://github.com/mileszs/wicked_pdf/issues/57 | |
Inside my show.pdf.erb from the view template I have some helper methods like | |
work_month() | |
number_to_currency() | |
My question is how does ERB result binding able to recognize these helper methods before generating it to PDF. | |
Because I always got: NoMethodError: undefined method | |
If I do follow a link views from controller action thru format.pdf it did works. | |
I just need to create a model class for my 'resque' work before sending an attachment email. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment