1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 08:43:23 -05:00

WIP, creating TaskList Controller and edit action & view

This commit is contained in:
Jason Denney 2014-03-08 15:34:58 -05:00
parent 30d818ac87
commit 656f0f12e4
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,5 @@
class TaskListsController < AuthenticatedController
def edit
@task_list = TaskList.find_by_id(params[:id])
end
end

View File

@ -0,0 +1,10 @@
%h2 Task List
%h3 #{@task_list.item.shop_id} #{@task_list.item.bike_brand}
%h4 #{@task_list.item.model}
%p
.control-group
- @task_list.tasks.each do |task|
.controls
%input{class: "task_list_task", type: "checkbox", "data-id" => task.id}
#{task.task}

View File

@ -9,6 +9,8 @@ Velocipede::Application.routes.draw do
get 'bikes/new', to: 'bikes#new', as: "new_bike"
get 'bikes/:id', to: 'bikes#show', as: "bike"
get 'task_lists/:id/edit' => "task_lists#edit", as: "edit_task_list"
###########################
# API Routes
scope 'api', :module => :api, defaults: {format: :json} do