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.
This commit is contained in:
@@ -7,6 +7,7 @@ module BudgetHeadingsHelper
|
||||
|
||||
def heading_link(assigned_heading = nil, budget = nil)
|
||||
return nil unless assigned_heading && budget
|
||||
|
||||
heading_path = budget_investments_path(budget, heading_id: assigned_heading&.id)
|
||||
link_to(assigned_heading.name, heading_path)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user