Skip to content

Instantly share code, notes, and snippets.

@annayo
annayo / gist:ead567b083896fc8c29a
Created February 25, 2015 19:36
link-to-custom
Ember.Handlebars.registerBoundHelper('link-to-custom', function () {
var args = [].slice.call(arguments);
var options = args[args.length-1];
var segments = App.Router.router.recognizer.recognize(args.shift().toLowerCase());
if (!segments) { return; }
var max = segments.length - 1;