Commit Graph

22 Commits

Author SHA1 Message Date
Javi Martín
e8195c201d Avoid warnings during initialization
These warnings appear in the logs in the development environment, and,
with Rails 7, the application will crash. When running the tests, they
would appear in the standard error ouput if we set `config.cache_classes
= false` in the test environment but, since that isn't the case, they
don't.

To reproduce these warnings (or the lack of them), start a Rails console
in development and check the log/development.log file.
2024-04-11 19:08:02 +02:00
Javi Martín
9491b20314 Extract method to get vote counts by votable type 2023-08-30 14:46:34 +02:00
Javi Martín
5977f2ec3d Simplify methods to get API-public records
Just like we did to tags in commit 2e863fdc5.
2022-05-02 17:16:31 +02:00
Javi Martín
0a3c86b92e Remove method to get votes for budget investments
After commit 0214184b2, this method was only used in two places and was
only useful in one of them. IMHO it isn't worth it add a monkey-patch
for such a minor usage.
2022-05-02 17:16:31 +02:00
Javi Martín
c25ab8e4a6 Remove unused vote extensions methods
These methods aren't used since commit b98244afd.
2022-05-02 17:16:31 +02:00
Javi Martín
033f3c33e3 Add SpaceAroundEqualsInParameterDefault rule
We were using it in most places, but not everywhere.
2019-10-24 17:56:03 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +02:00
rgarcia
11437a1d40 add budget investment stats 2019-05-16 13:41:49 +02:00
Julian Herrero
a8d8d2cdf9 Use double quotes in config/initializers 2019-03-15 10:29:03 +01:00
voodoorai2000
f4b8099703 Simplify sql query 2019-02-12 17:18:38 +01:00
rgarcia
56945d9bbe allows querying for a proposal's votes 2017-12-15 19:21:02 +01: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
kikito
9d97421b0e Merge branch 'master' into budgets 2016-12-27 14:02:12 +01:00
rgarcia
3c682b8a9b adds signature sheets 2016-12-20 12:21:05 +01:00
kikito
5f5e7b7c07 Adds vote extensions to handle budget_investments 2016-06-07 11:12:11 +02:00
rgarcia
ed1ec1c553 adds votes to spending proposals 2016-03-29 14:53:46 +02:00
rgarcia
ad8880d02c adds proposal votes 2015-09-13 21:56:52 +02:00
rgarcia
f2b917d486 adds proposal show 2015-09-12 12:30:20 +02:00
kikito
c2faf0ef92 Merge Vote.in with Vote.for_debates 2015-09-01 13:08:32 +02:00
rgarcia
9f2d60c4ce refactors voted debates 2015-08-15 14:57:41 +02:00