Commit Graph

17 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
d0d681a44b Add and apply EmptyLineAfterGuardClause rule
We were inconsistent on this one. I consider it particularly useful when
a method starts with a `return` statement.

In other cases, we probably shouldn't have a guard rule in the middle of
a method in any case, but that's a different refactoring.
2019-10-24 17:56:03 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
decabeza
4f1e70ea95 Remove redirect to poll officers 2019-05-17 16:30:33 +02:00
rgarcia
b4499321d3 stores officer booth on sign in 2019-03-28 15:47:52 +01:00
iagirre
6e238ae252 Changed redirection when signing out from management section 2018-07-15 17:35:30 -04:00
Bertocq
256eb682d0 Fix Rails/RequestReferer rubocop issue and remove from rubocop_todo list 2017-06-19 10:45:18 +02:00
Bertocq
02524b164a Rubocop autocorrections (indentations, revers unless to if, extra spaces) 2017-06-08 12:14:35 +02:00
kikito
d194bf0adc takes the user to the same page he was in after logout 2015-12-22 11:19:06 +01:00
kikito
866e04f776 makes devise remember the last visited page before login in 2015-12-21 16:44:30 +01:00
kikito
ac1507e85e Fixes error when signing up new users. Fixes #624 2015-10-23 12:09:45 +02:00
kikito
6da7854152 refactors sessions_controller 2015-10-09 13:30:19 +02:00
kikito
4c7dcbed39 Fixes welcome specs and adds a couple more tests 2015-10-08 16:26:41 +02:00
kikito
984ecd80f4 Fixes issue when a user does login without stored path 2015-10-06 18:48:57 +02:00
kikito
fc11a3b41b Restores the usage of the stored path instead of forcing root path after every login 2015-10-02 18:37:15 +02:00
kikito
5069f86eb9 Skips the welcome screen when the user is verifying via email 2015-10-02 18:36:40 +02:00
kikito
249aed42c4 Makes welcome screen work using a sessions controller 2015-09-10 17:41:37 +02:00