Make conditional a guard clause
This commit is contained in:
parent
bc38bfada7
commit
77ca4a675a
|
@ -38,11 +38,11 @@ module TodosHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def todo_target_state_pill(todo)
|
def todo_target_state_pill(todo)
|
||||||
if show_todo_state?(todo)
|
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
|
content_tag(:span, nil, class: 'target-status') do
|
||||||
todo.target.state.capitalize
|
content_tag(:span, nil, class: "status-box status-box-#{todo.target.state.dasherize}") do
|
||||||
end
|
todo.target.state.capitalize
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue