summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-17 12:54:02 +0000
committerPhil Hughes <me@iamphill.com>2016-03-17 12:54:02 +0000
commit421215e3385860af42530895c22021c0704275e2 (patch)
tree1da835043cf34e61729a6660829cf8a513e052c6 /app/controllers/dashboard
parent8f8720209f1f325042cbe3f134797c85cc0c64c4 (diff)
downloadgitlab-ce-421215e3385860af42530895c22021c0704275e2.tar.gz
Removed the flash success message
Removes the group if empty
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/todos_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 54f718d0110..10120dfdf3b 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -1,5 +1,5 @@
class Dashboard::TodosController < Dashboard::ApplicationController
- before_action :find_todos, only: [:index, :destroy_all]
+ before_action :find_todos, only: [:index, :destroy, :destroy_all]
def index
@todos = @todos.page(params[:page]).per(PER_PAGE)
@@ -14,7 +14,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController
format.html { redirect_to dashboard_todos_path, notice: todo_notice }
format.js { render nothing: true }
format.json do
- render json: { status: 'OK', notice: todo_notice }
+ render json: { count: @todos.size, done_count: current_user.todos.done.count }
end
end
end