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:
@@ -151,6 +151,7 @@ class ProposalsController < ApplicationController
|
||||
|
||||
def load_featured
|
||||
return unless !@advanced_search_terms && @search_terms.blank? && @tag_filter.blank? && params[:retired].blank? && @current_order != "recommendations"
|
||||
|
||||
if Setting["feature.featured_proposals"]
|
||||
@featured_proposals = Proposal.not_archived.unsuccessful
|
||||
.sort_by_confidence_score.limit(Setting["featured_proposals_number"])
|
||||
|
||||
Reference in New Issue
Block a user