Commit Graph

11 Commits

Author SHA1 Message Date
Julian Herrero
d24376f6ad Use double quotes in controllers/ 2019-03-13 22:19:49 +01:00
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
5ea16976f7 Refactor communities controller. Add missing specs on topics order. 2017-09-06 12:34:38 +02:00
taitus
5d22558c2b Fix specs 2017-09-05 12:54:32 +02:00
taitus
e1a7f9c58c Add community to Global Settings 2017-09-05 12:54:32 +02:00
taitus
54cf210b07 Fix rebase with master. 2017-09-05 12:53:37 +02:00
taitus
4539c5fa00 Refactor and tests. 2017-09-05 12:52:14 +02:00
taitus
a1d37fa6c4 Add order on topic index. 2017-09-05 12:51:08 +02:00
taitus
1dc3cd4bb3 Add paginate to topics 2017-09-05 12:51:08 +02:00
taitus
43c17c3fc7 Add communities and topics 2017-09-05 12:51:08 +02:00