Storing Rails ERb templates in the database, continued
In edge-rails, there are new ways of rendering templates.
In my previous posts, I showed how to render a template stored in the database to a variable for usage in generating a PDF. In edge-rails, this is now solved with:
letter = render_string_to_string(letter_template.body)
Now becomes:
letter = render(:inline => letter_template.body)
However, until the next release of Rails is out, unless you’re using Edge Rails, you can use my hack in the meantime.