Skip to content

Instantly share code, notes, and snippets.

@ajcubeta
Created June 11, 2012 06:12
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 ajcubeta/2908704 to your computer and use it in GitHub Desktop.
Save ajcubeta/2908704 to your computer and use it in GitHub Desktop.
Helper methods cause error when binding to ERB template using wicked_pdf
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