Sep 02

Rails PSA

Never ever use @template to refer to a model or object in your project !!!!!

Rails uses this name internally to track the ERb &| HAML templates, and it gets horribly confused. You get errors like:

undefined method `view_paths' for #


undefined method `render' for #

Save yourself some time and listen to me 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>