Commit Graph

9 Commits

Author SHA1 Message Date
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Javi Martín
78c6395e5f Respond with 404 when confirming an invalid token
We were getting a 500 Internal Server Error because `find_by` returned
`nil`, but the code assumed it returned an object responding to
`encrypted_password`. In this case, maybe some other status code (like
400 or 401) might be more appropriate, but I've kept 404 because it was
easier to implement and I wasn't sure which one was better.

Also note ideally we would test the controller using:

expect(response).to have_http_status(:not_found)

However, we would need to configure the test to show exceptions and not
to consider all requests local. I haven't been able to do so for
controller tests, and doing so for feature/request specs seems to
require changes in the test environment configuration which would affect
other tests.
2019-04-10 12:41:21 +02:00
Julian Herrero
d24376f6ad Use double quotes in controllers/ 2019-03-13 22:19:49 +01:00
Bertocq
3a54713ed0 Fix all Rails/DynamicFindBy rubocop issues 2017-07-10 23:04:27 +02:00
Josep Jaume Rey Peroy
5de3d700e4 Simplify Settings API 2016-01-18 12:43:34 +01:00
Jakub
e4b31cfe29 Move automatic official_level assignment to the controller. 2015-12-01 23:18:23 +01:00
kikito
ac90ea3e4f adds comments to confirmations_controller.rb 2015-10-09 16:27:37 +02:00
kikito
10de596a94 Adds missing parameter for confirmations 2015-10-08 15:19:28 +02:00
kikito
5f74528f12 Modifies devise so that unconfirmed users w/o password can set it when confirming their account 2015-10-07 20:18:54 +02:00