これは非常に基本的なことだと確信していますが、内部で ../model を使用することはできません{{#if_eq}}
。../../model を使用してみましたが、これは model._revs_info の子を指しています。
{{#each model._revs_info}}
{{debug ../model}}
{{#if_eq status compare="available"}}
{{debug ../model}}
<a href="#list/{{model.id}}/{{rev}}">{{rev}}</a>
{{/if_eq}}
{{/each}}
{{#if_eq}}
https://github.com/danharper/Handlebars-Helpers/blob/master/helpers.jsからコピーされました
/**
* If Equals
* if_eq this compare=that
*/
Handlebars.registerHelper('if_eq', function(context, options) {
if (context == options.hash.compare)
return options.fn(this);
return options.inverse(this);
});
{{debug}}
http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/からコピーされました
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");
console.log(this);
if (optionalValue) {
console.log("Value");
console.log("====================");
console.log(optionalValue);
}
});