Commit Graph

12 Commits

Author SHA1 Message Date
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
9fe8c47528 Apply Rails/SafeNavigation rubocop rule 2019-09-10 21:43:39 +02:00
Julian Herrero
a963a99c55 Use correct scope to sort headings by name 2019-02-13 13:35:09 +01:00
Julian Herrero
922600252c Make budget headings translatable 2019-02-13 13:35:07 +01:00
Julian Herrero
1c35ec99c1 Make budget groups translatable 2019-02-13 12:30:37 +01:00
decabeza
d70c46e578 Extract BudgetHeadingsHelper#heading_link & use it
Why:

The logic to construct the link to a heading (if it exists) is in three
different places, this is a clear candidate for a helper method.

How:

Just checking at the helper method if `assigned_heading` and `budget`
has values and composing the link if so.
2018-03-08 11:50:23 +01:00
kikito
748fd8becf Makes all tests pass in bi management 2016-12-07 19:16:37 +01:00
kikito
34071a0f9f Unifies budget_headings_helper 2016-12-06 18:03:03 +01:00
kikito
00cfb95913 Starts fixing management budget investments 2016-12-01 16:31:05 +01:00
Juanjo Bazán
8890380804 adds investment editing to admin 2016-09-07 14:13:40 +02:00
Juanjo Bazán
31ef3f4c98 adds heading filter to index 2016-09-06 17:03:35 +02:00