generator-ember-plus
Version:
Yeoman generator for Ember with added functionality
25 lines (18 loc) • 688 B
text/coffeescript
<%= _.classify(appname) %>.ApplicationRoute = Ember.Route.extend(Ember.SimpleAuth.ApplicationRouteMixin)
<%= _.classify(appname) %>.ApplicationRoute.reopen actions:
authenticateSession: ->
# Call the login method that shows the loginModal
@send "login"
return
loginModalSubmit: (username, password) ->
# Username and password are bindings in the loginModal template
@get("session").authenticate "authenticator:custom",
username: @controller.get("username")
password: @controller.get("password")
return
login: ->
Bootstrap.ModalManager.show "loginModal"
return
signup: ->
Bootstrap.NM.push "Signup!", "info"
return