Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-05-03 18:30:33 +0300
committerJacob Schatz <jschatz1@gmail.com>2016-05-25 15:15:20 +0300
commit2c8000e302c7c5382caaa235ece133ade687c7ac (patch)
treed70b2ca0731975bbe19a9c7db9d5202ff0473ee6 /app/helpers/todos_helper.rb
parent7586807fc3e01d641dfb1211e7c0a6a92e5e68c0 (diff)
Move conditional to a method
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r--app/helpers/todos_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index e01ff8407c3..150d826ac44 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -46,6 +46,10 @@ module TodosHelper
end
end
+ def show_todo_state?(todo)
+ (todo.target.is_a?(MergeRequest) || todo.target.is_a?(Issue)) && ['closed', 'merged'].include?(todo.target.state)
+ end
+
def todos_filter_params
{
state: params[:state],