Class: TasksController
Instance Method Summary
collapse
#backend, #redis_not_available
Instance Method Details
#create ⇒ Object
18
19
20
21
|
# File 'lib/engine/app/controllers/tasks_controller.rb', line 18
def create
@task = Task.create(task_params)
redirect_to action: :index
end
|
#destroy ⇒ Object
29
30
31
32
33
|
# File 'lib/engine/app/controllers/tasks_controller.rb', line 29
def destroy
@task = Task.find(params[:id])
@task.destroy
redirect_to action: :index
end
|
#edit ⇒ Object
14
15
16
|
# File 'lib/engine/app/controllers/tasks_controller.rb', line 14
def edit
@task = Task.find(params[:id])
end
|
#index ⇒ Object
6
7
8
|
# File 'lib/engine/app/controllers/tasks_controller.rb', line 6
def index
@tasks = Task.all
end
|
#new ⇒ Object
10
11
12
|
# File 'lib/engine/app/controllers/tasks_controller.rb', line 10
def new
@task = Task.new
end
|
#update ⇒ Object
23
24
25
26
27
|
# File 'lib/engine/app/controllers/tasks_controller.rb', line 23
def update
@task = Task.find(params[:id])
@task.update_attributes(task_params)
redirect_to action: :index
end
|