Commit Graph

9 Commits

Author SHA1 Message Date
Bertocq
e59ed81528 Return 404 accesing community without communitable
Why:

Somehow we're seeing communities without proposals at production. We
must find why and fix it, but first we need to throw a 404 at the user
instead of a 500 internal server error

How:

First catching the scenario of non-existent communitable at the
controller and raising a 404 error. Secondly preventing the author_id
access over a possibly nil object, this is a smell but it can't be
easily fixed right now... we need to correctly implement a relation
between Community and communitable and avoid the multiple occurences of
`community.from_proposal?` in the codebase that makes it impossible to
extend to a fourth communitable model.
2018-01-23 00:22:53 +01:00
Bertocq
e4e78c8f16 Rubocop autocorrections 2017-09-14 15:08:35 +02:00
taitus
25560a27fc Refactor Community model. 2017-09-06 14:07:44 +02:00
taitus
c5cb463a2e Refactor helpers. 2017-09-06 13:47:29 +02:00
taitus
8d0ba0bf5e Display tag author only proposal or budget investment author 2017-09-05 12:55:12 +02:00
taitus
90518d4f99 Refactor participants. Add scopes on User. 2017-09-05 12:54:32 +02:00
taitus
895c942a39 Add community to investments 2017-09-05 12:52:45 +02:00
taitus
4539c5fa00 Refactor and tests. 2017-09-05 12:52:14 +02:00
taitus
43c17c3fc7 Add communities and topics 2017-09-05 12:51:08 +02:00