Method: Cms::TasksController#create

Defined in:
app/controllers/cms/tasks_controller.rb

#createObject


11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/cms/tasks_controller.rb', line 11

def create
  @task = @page.tasks.build(params[:task])
  @task.assigned_by = current_user
  if @task.save
    flash[:notice] = "Page was assigned to '#{@task.assigned_to.}'"
    redirect_to @page.path
  else
    render :action => 'new'
  end
end