Javi Martín
9fe8c47528
Apply Rails/SafeNavigation rubocop rule
2019-09-10 21:43:39 +02:00
Javi Martín
a5ba13b599
Apply Rails/Presence rubocop rule
2019-09-10 21:43:38 +02:00
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
Julian Herrero
8e0bbf54f6
Replace harcoded images and documents settings
2019-06-04 11:50:09 +02:00
decabeza
5bdac5c4f5
Remove question and external_url fields from legislation proposals
2019-04-30 11:35:47 +02:00
Angel Perez
01c1ac2b10
Replace all occurrences of ActiveRecord::Base with ApplicationRecord
2019-04-17 17:40:56 +02:00
Javi Martín
4c35df4812
Use double quotes inside string interpolation
2019-03-25 14:58:54 +01:00
Julian Herrero
3ba961a2d7
Use double quotes in models
2019-03-14 17:25:43 +01:00
Javi Martín
e3ca700e17
Add concerns to set and order by a random seed
2019-02-20 11:51:32 +01:00
Javi Martín
660c59016b
Fix random proposals order in the same session
...
Using `setseed` and ordering by `RAND()` doesn't always return the same
results because, although the generated random numbers will always be
the same, PostgreSQL doesn't guarantee the order of the rows it will
apply those random numbers to, similar to the way it doesn't guarantee
an order when the `ORDER BY` clause isn't specified.
Using something like `reorder("legislation_proposals.id % #{seed}")`,
like we do in budget investments, is certainly more elegant but it makes
the test checking two users get different results fail sometimes, so
that approach might need some adjustments in order to make the results
more random.
2019-02-20 11:51:32 +01:00
decabeza
6b62ba0e91
Show cached_votes_score on admin legislation proposals
2019-02-12 18:42:44 +01:00
decabeza
0ae1cdfc8c
Replace total votes to cached_votes_score on legislation proposals
...
This show votes_score as result of votes_up minus votes_down
2019-02-12 18:42:41 +01:00
Julian Herrero
ef835bef1c
new algorithm for filter 'most active'
2018-12-13 11:42:22 +01:00
Javi Martín
8976280493
Order selected proposals by confidence score
...
The same way we order budget results.
2018-10-04 16:31:00 +02:00
Javi Martín
dc9cf5da55
Order by supports in descending order
...
Just as we do with confidence score, and as admins expect when they
order by received supports: the ones with more supports appear first.
2018-10-04 16:29:01 +02:00
Raúl Fuentes
05340e423c
Add select to Legislation::Proposals
...
Add admin interface for mark any proposal as selected
Add filter to public interface for selected proposals
2018-10-04 16:28:56 +02:00
decabeza
7c194f6042
Adds imageable to legislation proposals
2018-10-01 16:48:46 +02:00
rgarcia
2b52d26d82
refactors notifications into concerns and shared examples
2017-12-14 16:15:30 +01:00
rgarcia
abaf6ab785
adds model validations for legislation proposals
2017-12-13 12:52:25 +01:00
Bertocq
cd66ba5d54
Rubocop autocorrections
2017-11-13 02:22:00 +01:00
María Checa
5ae31a6d01
Prevent responsible_name and question from validation
2017-10-27 10:43:37 +02:00
María Checa
b5f2f9aa21
Added cached_votes_total and cached_votes_down to Legislation Proposals
2017-10-25 16:42:24 +02:00
María Checa
5ae8cda0d5
Fixed legislation proposal vote action
2017-09-21 16:23:34 +02:00
María Checa
ba041f90c8
Removed unnecessary parts in Legislation Proposals
2017-09-21 16:17:11 +02:00
María Checa
c1672bdbf4
Legislation proposals adaptation in some models and initializers
2017-09-19 10:10:10 +02:00
María Checa
335399e571
Created Legislation Proposals model
2017-09-14 12:50:48 +02:00
María Checa
f521a9023b
Added Proposal model to Legislation
...
This new Legislation::Proposal model inherits from the original Proposal, as it will behave in a very similar way.
2017-09-13 15:43:36 +02:00