Module: TodosActions

Extended by:
ActiveSupport::Concern
Included in:
Projects::TodosController
Defined in:
app/controllers/concerns/todos_actions.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
# File 'app/controllers/concerns/todos_actions.rb', line 6

def create
  todo = TodoService.new.mark_todo(issuable, current_user)

  render json: {
    count: TodosFinder.new(current_user, state: :pending).execute.count,
    delete_path: dashboard_todo_path(todo)
  }
end