Commit Graph

4 Commits

Author SHA1 Message Date
Javi Martín
83e4633643 Don't redirect to POST request URLs after sign out
Sometimes we define URLs for POST requests which are not defined for GET
requests, such as "/residence", so redirecting to it after signing out
results in a routing error.

So instead of using the request referer, we're using the stored location
devise uses, and we're not storing locations in POST requests.
2020-08-11 18:19:48 +02:00
Javi Martín
2fa8792a35 Redirect users in homepage to homepage after login
For reasons I'm not sure about, the homepage (and the welcome pages)
were an exception in our "redirect users to the same page they were"
policy.

I'm not sure about the welcome pages (no test was present indicating
they should behave in a special way), but in the case of the home page,
it was a bit annoying to be redirected to a different place after
signing in.
2020-08-11 18:19:27 +02:00
Andriy Iun
1ee750e042 Keep GET params in return URL
When signing in from a page containing GET params, like
`/budgets/1/investments?heading_id=4`, we were redirected to a URL
without those GET params; in this case, `/budgets/1/investments`.

Using the request fullpath, as recommended in the devise documentation,
keeps these parameters when redirecting.
2020-08-11 18:19:25 +02:00
Javi Martín
9427f01442 Use system specs instead of feature specs
We get rid of database cleaner, and JavaScript tests are faster because
between tests we now rollback transactions instead of truncating the
database.
2020-04-24 15:43:54 +02:00