GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 16970d07 authored by Phil Hughes's avatar Phil Hughes

Returns created todos to control rather than re-query

parent 8abd7b35
class Projects::TodosController < Projects::ApplicationController
def create, current_user)
todos =, current_user)
render json: {
todo: current_user.todos.find_by(state: :pending, action: Todo::MARKED, target_id:,
todo: todos,
count: current_user.todos.pending.count,
......@@ -148,7 +148,7 @@ def mark_todo(issuable, current_user)
def create_todos(users, attributes)
Array(users).each do |user|
Array(users).map do |user|
next if pending_todos(user, attributes).exists?
......@@ -27,7 +27,7 @@
= link_to dashboard_todos_path, title: 'Todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('bell fw')
%span.badge.todos-pending-count{ class: ("hidden" if todos_pending_count == 0)}
%span.badge.todos-pending-count{ class: ("hidden" if todos_pending_count == 0) }
= todos_pending_count
- if current_user.can_create_project?
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment