dist/ember-template-compiler.js in ember-source-1.0.0.rc3.5 vs dist/ember-template-compiler.js in ember-source-1.0.0.rc4
- old
+ new
@@ -1,9 +1,9 @@
(function() {
var Ember = { assert: function() {} };
-// Version: v1.0.0-rc.3-2-g85bfdbf
-// Last commit: 85bfdbf (2013-07-25 20:16:20 -0400)
+// Version: v1.0.0-rc4
+// Last commit: ae2e55f (2013-05-27 19:34:11 -0400)
(function() {
/**
@module ember
@@ -20,11 +20,12 @@
var Handlebars = this.Handlebars || (Ember.imports && Ember.imports.Handlebars);
if(!Handlebars && typeof require === 'function') {
Handlebars = require('handlebars');
}
-Ember.assert("Ember Handlebars requires Handlebars 1.0.0-rc.3 or greater. Include a SCRIPT tag in the HTML HEAD linking to the Handlebars file before you link to Ember.", Handlebars && Handlebars.COMPILER_REVISION === 2);
+Ember.assert("Ember Handlebars requires Handlebars version 1.0.0-rc.4. Include a SCRIPT tag in the HTML HEAD linking to the Handlebars file before you link to Ember.", Handlebars)
+Ember.assert("Ember Handlebars requires Handlebars version 1.0.0-rc.4, COMPILER_REVISION expected: 3, got: " + Handlebars.COMPILER_REVISION + " – Please note: Builds of master may have other COMPILER_REVISION values.", Handlebars.COMPILER_REVISION === 3);
/**
Prepares the Handlebars templating library for use inside Ember's view
system.
@@ -38,13 +39,28 @@
@class Handlebars
@namespace Ember
*/
Ember.Handlebars = objectCreate(Handlebars);
+function makeBindings(options) {
+ var hash = options.hash,
+ hashType = options.hashTypes;
+
+ for (var prop in hash) {
+ if (hashType[prop] === 'ID') {
+ hash[prop + 'Binding'] = hash[prop];
+ hashType[prop + 'Binding'] = 'STRING';
+ delete hash[prop];
+ delete hashType[prop];
+ }
+ }
+}
+
Ember.Handlebars.helper = function(name, value) {
if (Ember.View.detect(value)) {
- Ember.Handlebars.registerHelper(name, function(name, options) {
+ Ember.Handlebars.registerHelper(name, function(options) {
Ember.assert("You can only pass attributes as parameters to a application-defined helper", arguments.length < 3);
+ makeBindings(options);
return Ember.Handlebars.helpers.view.call(this, value, options);
});
} else {
Ember.Handlebars.registerBoundHelper.apply(null, arguments);
}
\ No newline at end of file