Lookup templates using the container

This commit is contained in:
Robin Ward 2014-10-29 10:32:57 -04:00
parent fe8d9642a0
commit daf7239d87

View File

@ -1,11 +1,10 @@
Handlebars.registerHelper('raw', function(property, options) {
var template = Discourse.__container__.lookup('template:' + property + ".raw"),
params = options.hash;
var template = Em.TEMPLATES[property + ".raw"];
var params = options.hash;
if(params) {
for(var prop in params){
if(options.hashTypes[prop] === "ID") {
if (params) {
for (var prop in params) {
if (options.hashTypes[prop] === "ID") {
params[prop] = Em.Handlebars.get(this, params[prop], options);
}
}