summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/tasks_controller.rb21
-rw-r--r--app/controllers/dashboard/todos_controller.rb23
2 files changed, 23 insertions, 21 deletions
diff --git a/app/controllers/dashboard/tasks_controller.rb b/app/controllers/dashboard/tasks_controller.rb
deleted file mode 100644
index a8884be54e4..00000000000
--- a/app/controllers/dashboard/tasks_controller.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-class Dashboard::TasksController < Dashboard::ApplicationController
- def index
- @tasks = TasksFinder.new(current_user, params).execute
- @tasks = @tasks.page(params[:page]).per(PER_PAGE)
- end
-
- def destroy
- task.done!
-
- respond_to do |format|
- format.html { redirect_to dashboard_tasks_path, notice: 'Task was successfully marked as done.' }
- format.js { render nothing: true }
- end
- end
-
- private
-
- def task
- @task ||= current_user.tasks.find(params[:id])
- end
-end
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
new file mode 100644
index 00000000000..e24b8d3e58f
--- /dev/null
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -0,0 +1,23 @@
+class Dashboard::TodosController < Dashboard::ApplicationController
+ def index
+ @todos = TodosFinder.new(current_user, params).execute
+ @todos = @todos.page(params[:page]).per(PER_PAGE)
+ end
+
+ def destroy
+ todo.done!
+
+ respond_to do |format|
+ format.html { redirect_to dashboard_todos_path, notice: 'Todo was successfully marked as done.' }
+ format.js { render nothing: true }
+ end
+ end
+
+ private
+
+ def todo
+ @todo ||= current_user.todos.find(params[:id])
+ end
+end
+
+