Skip to content

Commit

Permalink
Template helper to handle basic template properties.
Browse files Browse the repository at this point in the history
enricofoschi committed Jun 1, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a93aa44 commit 75d4986
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/scripts/helpers/template.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class @Helpers.Client.TemplatesHelper

@Handle: (name) ->

template = Template[name]

template.created = ->
template.instance = template.instance || Template.instance()

template.helpers {
'currentUser': ->
new MeteorUser Meteor.user()
}

template

0 comments on commit 75d4986

Please sign in to comment.