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