Class: Ltm::TasksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Ltm::TasksController
- Defined in:
- app/controllers/ltm/tasks_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/controllers/ltm/tasks_controller.rb', line 11 def create @task = Task.create(task_params) if @task.save redirect_to tasks_path, notice: "Task created" else render :new end end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/ltm/tasks_controller.rb', line 3 def index @tasks = Task.all end |