Commit Graph

19 Commits

Author SHA1 Message Date
Javi Martín
f427c757ba Use hash conditions instead of SQL's IN
This is what we're doing in most places.
2020-07-08 18:34:58 +02:00
Javi Martín
47b2c42a1d Apply IndentationConsistency rubocop rule 2019-09-10 20:02:15 +02:00
Javi Martín
234a5108a4 Use strings for class_name
As mentioned in the Rails console:

DEPRECATION WARNING: Passing a class to the `class_name` is deprecated
and will raise an ArgumentError in Rails 5.2. It eagerloads more classes
than necessary and potentially creates circular dependencies. Please
pass the class name as a string.
2019-05-28 14:26:18 +02:00
decabeza
cb22e6cbfb Merge branch 'master' into proposal-dashboard 2019-04-23 17:12:47 +02:00
Angel Perez
01c1ac2b10 Replace all occurrences of ActiveRecord::Base with ApplicationRecord 2019-04-17 17:40:56 +02:00
decabeza
f47ec9d7dc Fix hound warnings 2019-03-26 18:21:19 +01:00
Juan Salvador Pérez García
0e8746299d Fixes #232
In proposal's dashboard, inside community section, the latests topics
has been replaced by latest messages.
2018-07-18 16:50:51 +02:00
Juan Salvador Pérez García
ba753f3649 Fixes #222
Community view shows the polls for the given proposal.
2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
e8cd54d621 Adds community to proposals dashboard 2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
33d227d5dd Proposal community
Poll participants become automatically members of the proposal community
2018-07-17 17:59:11 +02: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
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