Class: Flyboy::TaskCommentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/flyboy/task_comments_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_ability

Instance Method Details

#createObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/flyboy/task_comments_controller.rb', line 5

def create
  @task         ||= Task.find(params[:task_id])
  @task_comment ||= @task.comments.new(task_comment_params)

  authorize! :update, @task

  if @task_comment.save
    redirect_to @task
  else
    render "flyboy/tasks/show"
  end
end