Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed additional locals iterations - redundant

  • Loading branch information...
commit 07645a2f3b1a490b00c4708cf0ef55494ec5efea 1 parent 45dd2f7
@fk1blow authored
Showing with 3 additions and 12 deletions.
  1. +3 −12 lib/View/View.js
View
15 lib/View/View.js
@@ -43,11 +43,7 @@ var Renderer = Klass({
renderView: function(view, locals) {
var self = this;
var v = ViewUtils.loadViewFile(view);
- var p = {};
- for(var i in locals) {
- p[i] = locals[i];
- }
- return ejs.render(v, { locals: p });
+ return ejs.render(v, { locals: locals });
},
renderStringToLayout: function(output_string, locals, layout, content_type) {
@@ -69,15 +65,10 @@ var Renderer = Klass({
return ejs.render(v);
},
- _loadContentForLayout: function(view, locales) {
+ _loadContentForLayout: function(view, locals) {
var self = this;
var v = ViewUtils.loadViewFile(view);
- var p = {};
-
- for(var i in locales) {
- p[i] = locales[i];
- }
- return ejs.render(v, { locals: p });
+ return ejs.render(v, { locals: locals });
},
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.