Skip to content

Instantly share code, notes, and snippets.

View ajcubeta's full-sized avatar
😎
I just came back!

Andre Joseph ajcubeta

😎
I just came back!
View GitHub Profile
@ajcubeta
ajcubeta / wicked_pdf
Created June 11, 2012 06:12
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
import React, { Component } from 'react';
import TemplateDetails from './TemplateDetails';
import cx from 'classnames';
class Library extends Component {
constructor(props) {
super(props);
this.state = {
templates: [],
selectedTemplate: null,