Closed paulmillr closed 12 years ago
by the way, could you please post some recomentations for how to make logout?
I fixed the reference to the non-existing variable, but I don’t understand how this impairs the logout process.
In general, the logout process is triggered by fireing the !logout
event. The SessionController listens for this event, disposes the users, resets some state variables and shows the login view again. The difference between the !logout
and logout
event is that there can be some I/O action between them. For example, on moviepilot.com, we’re destroying the session on the server and if that suceeds, logout
is triggered (which means logout successful).
Also, changing the controllerName to @currentControllerName will not prevent the code from from throwing an exception. ;) Every controller should have a historyURL
property or method. If it doesn’t, an exception will be thrown in the adjustURL
method.
cool, thanks
And the cause is this https://github.com/moviepilot/chaplin/blob/master/coffee/views/application_view.coffee#L182 function
On L198 there's
controllerName
but it's undefined variable.