Javi Martín
d0d681a44b
Add and apply EmptyLineAfterGuardClause rule
...
We were inconsistent on this one. I consider it particularly useful when
a method starts with a `return` statement.
In other cases, we probably shouldn't have a guard rule in the middle of
a method in any case, but that's a different refactoring.
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
Javi Martín
93c6347b45
Apply Rails/FindBy rubocop rule
...
We were already using it in most places.
2019-10-23 18:29:09 +02:00
Juanjo Bazán
7ab602175a
makes models inherit from ApplicationRecord
2019-04-17 17:40:56 +02:00
alejandro
596ff77ec1
replaces uniq with distinct
...
Uniq is deprecated
2019-04-16 17:28:07 +02:00
rgarcia
aeb84108bc
Verify poll ballots
2019-04-10 18:29:01 +02:00
rgarcia
aa7441271d
Prevent balloting online after casting a ballot offline
2019-04-03 22:19:51 +02:00
Bertocq
2888c20489
Fix all Style/RedundantSelf rubocop issues
2017-07-05 11:55:52 +02:00
Juanjo Bazán
3eb22ab7b9
removes exception on invalid vote
...
responds rendering correct error message instead
2017-05-16 13:12:32 +02:00
rgarcia
8083f259c2
takes into account headings without balloted investments
2017-05-03 17:49:29 +02:00
rgarcia
2f6c1bc7bc
displays the correct amount spent in review my ballot
...
returns the first heading with investments for a group
2017-05-03 17:06:27 +02:00
kikito
b289e21992
Refactors valid_heading
2017-01-04 13:56:54 +01:00
kikito
a589d8a76d
Simplifies ballot.add_investment using automatic denormalization
2016-12-23 15:37:32 +01:00
kikito
4434a601d3
Implements several helper methods for formatting amounts
2016-12-14 11:49:16 +01:00
rgarcia
24740578ff
displays money remaining in each group
2016-09-10 16:22:42 +02:00
rgarcia
22373c3ddd
Review my votes page
2016-09-10 16:22:41 +02:00
rgarcia
9d4f2d1aff
Displays budget groups
2016-09-10 16:22:41 +02:00
rgarcia
3c55d66591
fixes conflicts with budget
2016-07-27 11:41:46 +02:00
Juanjo Bazán
1b57e14a86
removes heading reference in ballot
...
heading info is stored per group in ballot_lines
2016-06-14 14:04:27 +02:00
Juanjo Bazán
4fcf138045
refactors investment adding to ballots
2016-06-14 14:03:21 +02:00
Juanjo Bazán
b5a6828e41
adds Budget::Group model to group headings
...
many refactors through budget related models
2016-06-09 18:00:06 +02:00
kikito
1aa70bec94
Adds method Ballot#has_investment?
2016-06-07 11:10:42 +02:00
kikito
c6c3e22a40
Adds methods for investments in models
2016-06-03 18:44:34 +02:00
kikito
bb7f82a72f
Fixes hidden bug when calculating amount_available
2016-05-27 15:12:54 +02:00
kikito
3e39272b3b
Fixes implementation of amount_available moving it to the ballot
2016-05-24 17:39:49 +02:00
Juanjo Bazán
57642075a7
adds ballot model spec
2016-05-24 13:04:12 +02:00
Juanjo Bazán
1cae255555
changes sps to investments in ballot relation
2016-05-24 13:04:12 +02:00
Juanjo Bazán
c48059594b
removes belongs_to :heading relation from ballot
2016-05-24 13:04:12 +02:00
kikito
ccffcf60b3
Replaces geozones by headings in the models
2016-05-20 14:06:50 +02:00
kikito
9d195609f9
Adds models
2016-05-20 12:41:48 +02:00