summaryrefslogtreecommitdiff
path: root/app/helpers/todos_helper.rb
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-05-18 20:23:00 -0500
committerJacob Schatz <jschatz1@gmail.com>2016-05-25 08:15:20 -0400
commit77ca4a675ac7f8684f0b7c10592140365fc13a2d (patch)
treeecf6834c63c03269bf0a1ee03797f89aafffb0d7 /app/helpers/todos_helper.rb
parentbc38bfada7eb0f99be02399fcee6672011f29c79 (diff)
downloadgitlab-ce-77ca4a675ac7f8684f0b7c10592140365fc13a2d.tar.gz
Make conditional a guard clause
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r--app/helpers/todos_helper.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index 27f33b3eded..b9d7edb4185 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -38,11 +38,11 @@ module TodosHelper
end
def todo_target_state_pill(todo)
- if show_todo_state?(todo)
- content_tag(:span, nil, class: 'target-status') do
- content_tag(:span, nil, class: "status-box status-box-#{todo.target.state.dasherize}") do
- todo.target.state.capitalize
- end
+ return unless show_todo_state?(todo)
+
+ content_tag(:span, nil, class: 'target-status') do
+ content_tag(:span, nil, class: "status-box status-box-#{todo.target.state.dasherize}") do
+ todo.target.state.capitalize
end
end
end