Sha256: 59fc1f12c14909898d7ac4077e40d581a8da875000b8514e32d95dccb8953a22

Contents?: true

Size: 378 Bytes

Versions: 5

Compression:

Stored size: 378 Bytes

Contents

class TasksController < AuthorizedController
  def new
    # Allow callers specifying defaults
    @task = Task.new(params[:task])

    # Nested resources support
    @task.project_id ||= params[:project_id] if params[:project_id]

    # Educated guessing of defaults
    @task.person = current_user.person if current_user
    
    new!{ projects_url(@task.project) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bookyt_projects-0.3.2 app/controllers/tasks_controller.rb
bookyt_projects-0.3.1 app/controllers/tasks_controller.rb
bookyt_projects-0.3.0 app/controllers/tasks_controller.rb
bookyt_projects-0.2.3 app/controllers/tasks_controller.rb
bookyt_projects-0.2.2 app/controllers/tasks_controller.rb