Commit fc084b0e07aba71a1bdf3e9e8d47a9fd46e8030d

Authored by Ryan Glover
Exists in master

Merge branch 'bug/fix_currentroute_helper_#16'

client/helpers/helpers-ui.js
1 /* 1 /*
2 * UI Helpers 2 * UI Helpers
3 * Define UI helpers for common template functionality. 3 * Define UI helpers for common template functionality.
4 */ 4 */
5 5
6 /* 6 /*
7 * Current Route 7 * Current Route
8 * Return an active class if the currentRoute session variable name 8 * Return an active class if the currentRoute session variable name
9 * (set in the appropriate file in /client/routes/) is equal to the name passed 9 * (set in the appropriate file in /client/routes/) is equal to the name passed
10 * to the helper in the template. 10 * to the helper in the template.
11 */ 11 */
12 12
13 UI.registerHelper('currentRoute', function(route){ 13 UI.registerHelper('currentRoute', function(route){
14 Session.equals('currentRoute', route) ? 'active' : ''; 14 return Session.equals('currentRoute', route) ? 'active' : '';
15 }); 15 });
16 16