Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accept invitation should set the flash only if this.valid? [#930 stat…
…e:resolved]
- Loading branch information
f9c2770
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean to delete the
self.current_user = this
as well? This is a significant behavior change. Maybe the right one, but it will change the way a lot of apps work...f9c2770
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bryan,
it should not change any behaviour of any old app, since it is a change in a generator template, so it affects only the UserController of the new created app: there is no change in the hobo framework itself.
As for the fact that I deleted it: if you try to stop at line 19, self.current_user is already set: indeed it is set by the key in the url that triggers the do_accept_invitation, so IMHO it is just redundant. Am I missing something?
f9c2770
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-thinkig about the fact that it is already set: it should not be set. I have to investigate: may be it has something to do with https://hobo.lighthouseapp.com/projects/8324/tickets/718-lifecycle-transitions-with-validation-errors-should-not-update-the-state-field, or the bug that Tom reported a few days ago.
f9c2770
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No bugs, just the logged in user in development mode made me think something stupid! :-)
The current_user is correctly set to guest, and this is the user record, so everything is ok, I have just to restore the statement :-)
Thank you.