Allow to override sign in and sign out callbacks on routes

This commit is contained in:
Piotr Sarnacki 2013-05-16 12:46:58 +02:00
parent eb065a0eee
commit 90ffeaf085

View File

@ -50,10 +50,16 @@ Ember.Router.reopen
Ember.Route.reopen
events:
afterSignIn: (path) ->
@routeTo(path)
@afterSignIn(path)
afterSignOut: ->
@routeTo('/')
@afterSignOut()
afterSignIn: (path) ->
@routeTo(path)
afterSignOut: ->
@routeTo('/')
routeTo: (path) ->
return unless path