Simplify return statement

Just the way is usually done in the rest of the code.
This commit is contained in:
Javi Martín
2019-01-10 15:20:26 +01:00
parent d5d800f75c
commit f8e9566699

View File

@@ -145,9 +145,10 @@ class Budget
if allowed_sort_option.present?
direction = params[:direction] == "desc" ? "desc" : "asc"
return order("#{allowed_sort_option} #{direction}")
order("#{allowed_sort_option} #{direction}")
else
order(cached_votes_up: :desc).order(id: :desc)
end
order(cached_votes_up: :desc).order(id: :desc)
end
def self.limit_results(budget, params, results)