diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-06-18 01:42:36 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-18 05:17:06 +0300 |
commit | 78328eee435fc632859c2f0f61cffb8192bda416 (patch) | |
tree | 9132a64ae5d2343cb63fc03fe795b7d2dd35081c /app/helpers/issuables_helper.rb | |
parent | 5c8a1b348752a33e08a213d4fb35d8dd8b838fda (diff) |
Merge branch 'issuable-todo-improvements'
# Conflicts:
# app/controllers/projects/todos_controller.rb
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r-- | app/helpers/issuables_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 8dbc51a689f..8231ce49fac 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -67,9 +67,9 @@ module IssuablesHelper end end - def has_todo(issuable) - unless current_user.nil? - current_user.todos.find_by(target_id: issuable.id, state: :pending) + def issuable_todo(issuable) + if current_user + current_user.todos.find_by(target: issuable, state: :pending) end end |