Skip to content

Commit

Permalink
added current route to fromWhere session var
Browse files Browse the repository at this point in the history
  • Loading branch information
musgravejw committed Jun 17, 2014
1 parent 4954d7d commit 94aafc5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shared/router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Router.map ->
onBeforeAction: ->
Session.set('entryError', undefined)
Session.set('buttonText', 'in')
Session.set('fromWhere', Router.current().path)
onRun: ->
if Meteor.userId()
Router.go AccountsEntry.settings.dashboardRoute
Expand Down

1 comment on commit 94aafc5

@ajem70
Copy link

@ajem70 ajem70 commented on 94aafc5 Jul 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@route "entrySignIn",
path: "/sign-in"
onBeforeAction: ->
Session.set('entryError', undefined)
Session.set('buttonText', 'in')
#Session.set('fromWhere', Router.current().path)
onRun: ->
if Meteor.userId()
#Router.go AccountsEntry.settings.dashboardRoute
Router.go Session.get('fromWhere')

I change the code to redirect to resource after login

Please sign in to comment.