Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queues- Anna Barklund- TaskList #35

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c943bb8
created a new rails
amb54 Mar 20, 2017
f3526da
Finished with Wave1
amb54 Mar 21, 2017
23eecfb
Finished with Wave2 and Wave3, basics
amb54 Mar 22, 2017
d7dcef0
updated the html.erb files with sections and id's and subsequently wo…
amb54 Mar 23, 2017
0919496
Added new-task-buttn. Changed header background to green
amb54 Mar 23, 2017
68a39d8
Added a delete button with confirmation pop up box. Dried the code fo…
amb54 Mar 24, 2017
24fa8dc
Finished first version of task completed with date. Un-commented rest…
amb54 Mar 24, 2017
cb5f975
Reworked application header: New color scheme, home-link that links t…
amb54 Mar 26, 2017
16c2fc7
Changed naming of method task_completed to status with subsequent cha…
amb54 Mar 26, 2017
6489339
Rearranged the index view. Sectioned the header h1 and the add-button…
amb54 Mar 26, 2017
94e7735
Rearranged the nav section in index.html.erb and tasks.css.
amb54 Mar 26, 2017
ff46f73
Additional rearrangement to nav
amb54 Mar 26, 2017
4537dbf
rearranged pages new and edit. Added new images for add, edit and del…
amb54 Mar 27, 2017
cf73e86
Additional changes to the view (index and task.css)
amb54 Mar 27, 2017
b0466d8
Two images for to list ( back and go) added to images. show updated w…
amb54 Mar 27, 2017
54fa38b
Added image for go to list link on welcome page
amb54 Mar 27, 2017
8032091
Added image for go to list link to _font.html.erb
amb54 Mar 27, 2017
1d2aba0
Created two methods in task.rb (status_change and status_info). Subse…
amb54 Mar 27, 2017
b69d68c
Developed status_info in task.rb to return an array with elements use…
amb54 Mar 27, 2017
ca8d71a
Added two status images and updated index and task.rb to use these im…
amb54 Mar 27, 2017
f2bff81
Added status buttons to show
amb54 Mar 27, 2017
c6493de
Specified hover for text links in the tasks list. Cleaned up the code…
amb54 Mar 27, 2017
c83c7eb
Ready to submit.
amb54 Mar 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed naming of method task_completed to status with subsequent cha…
…nges in routes.rb and index.html.erb
amb54 committed Mar 26, 2017
commit 16c2fc743731fdeafe46cafd1f482d6a70ec2ada
2 changes: 1 addition & 1 deletion app/controllers/tasks_controller.rb
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ def update
redirect_to task_path(task)
end

def task_completed
def status
task = Task.find(params[:id])
task[:completion_date] = Time.now
task.save
2 changes: 1 addition & 1 deletion app/views/tasks/index.html.erb
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@


<%= link_to "Edit task", edit_task_path(task) %>
<%= link_to "Completed", task_completed_path(task), method: :patch %>
<%= link_to "Completed", status_path(task), method: :patch %>
<%= link_to "Delete", task_path(task),
data: {method: :delete, confirm: "Are you sure you want to delete the task #{task.name}"}%>
<!-- <%###################= button_to "Delete", task_path(task), method: :delete%> -->
2 changes: 1 addition & 1 deletion app/views/welcome/index.html.erb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
</p>

<div>
<%=link_to "List of all tasks", tasks_path %>
<%=link_to "To the list", tasks_path %>
</div>
</div>
</main>
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
get 'tasks/:id/edit', to: 'tasks#edit', as: 'edit_task'
patch 'tasks/:id', to: 'tasks#update'

patch 'tasks/:id/completed', to: 'tasks#task_completed', as: 'task_completed'
patch 'tasks/:id/status', to: 'tasks#status', as: 'status'
delete 'tasks/:id', to: 'tasks#destroy'

end
Binary file modified db/development.sqlite3
Binary file not shown.
108 changes: 108 additions & 0 deletions log/development.log
Original file line number Diff line number Diff line change
@@ -5541,3 +5541,111 @@ Processing by WelcomeController#index as HTML
Completed 200 OK in 23ms (Views: 20.2ms | ActiveRecord: 0.0ms)


Started GET "/tasks" for ::1 at 2017-03-26 14:07:20 -0700
Processing by TasksController#index as HTML
Rendering tasks/index.html.erb within layouts/application
Task Load (0.2ms) SELECT "tasks".* FROM "tasks"
Rendered tasks/index.html.erb within layouts/application (10.2ms)
Completed 200 OK in 32ms (Views: 26.0ms | ActiveRecord: 0.7ms)


Started PATCH "/tasks/8/status" for ::1 at 2017-03-26 14:07:24 -0700
Processing by TasksController#status as HTML
Parameters: {"authenticity_token"=>"QhMa2Vj8H7aSxTcz0dGdRSc//iUOd1nG3wcsSE/gki6NU0D8yt9IR/rq9HmaXif2LrEYLxyqDJzjYuqxedrRQA==", "id"=>"8"}
Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]]
 (0.0ms) begin transaction
SQL (0.2ms) UPDATE "tasks" SET "completion_date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["completion_date", 2017-03-26 21:07:24 UTC], ["updated_at", 2017-03-26 21:07:24 UTC], ["id", 8]]
 (1.2ms) commit transaction
Redirected to http://localhost:3000/tasks
Completed 302 Found in 4ms (ActiveRecord: 1.6ms)


Started GET "/tasks" for ::1 at 2017-03-26 14:07:24 -0700
Processing by TasksController#index as HTML
Rendering tasks/index.html.erb within layouts/application
Task Load (0.1ms) SELECT "tasks".* FROM "tasks"
Rendered tasks/index.html.erb within layouts/application (3.8ms)
Completed 200 OK in 24ms (Views: 22.1ms | ActiveRecord: 0.1ms)


Started PATCH "/tasks/8/status" for ::1 at 2017-03-26 14:07:34 -0700
Processing by TasksController#status as HTML
Parameters: {"authenticity_token"=>"RmKvN/NRhTEtL2KVsh2hTjcltgxp5oCsjbEnt1Y9WVSJIvUSYXLSwEUAod/5khv9PqtQBns71fax1OFOYAcaOg==", "id"=>"8"}
Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]]
 (0.0ms) begin transaction
SQL (0.3ms) UPDATE "tasks" SET "completion_date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["completion_date", 2017-03-26 21:07:34 UTC], ["updated_at", 2017-03-26 21:07:34 UTC], ["id", 8]]
 (0.4ms) commit transaction
Redirected to http://localhost:3000/tasks
Completed 302 Found in 3ms (ActiveRecord: 0.9ms)


Started GET "/tasks" for ::1 at 2017-03-26 14:07:34 -0700
Processing by TasksController#index as HTML
Rendering tasks/index.html.erb within layouts/application
Task Load (0.2ms) SELECT "tasks".* FROM "tasks"
Rendered tasks/index.html.erb within layouts/application (9.4ms)
Completed 200 OK in 29ms (Views: 27.0ms | ActiveRecord: 0.2ms)


Started PATCH "/tasks/8/status" for ::1 at 2017-03-26 14:07:40 -0700
Processing by TasksController#status as HTML
Parameters: {"authenticity_token"=>"7dE1UNXuGNvO79acBGbutnAbLExF6AYxYDC6U4GaCIkikW91R81PKqbAFdZP6VQFeZXKRlc1U2tcVXyqt6BL5w==", "id"=>"8"}
Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]]
 (0.1ms) begin transaction
SQL (0.4ms) UPDATE "tasks" SET "completion_date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["completion_date", 2017-03-26 21:07:40 UTC], ["updated_at", 2017-03-26 21:07:40 UTC], ["id", 8]]
 (1.2ms) commit transaction
Redirected to http://localhost:3000/tasks
Completed 302 Found in 5ms (ActiveRecord: 1.8ms)


Started GET "/tasks" for ::1 at 2017-03-26 14:07:41 -0700
Processing by TasksController#index as HTML
Rendering tasks/index.html.erb within layouts/application
Task Load (0.1ms) SELECT "tasks".* FROM "tasks"
Rendered tasks/index.html.erb within layouts/application (3.9ms)
Completed 200 OK in 23ms (Views: 21.6ms | ActiveRecord: 0.1ms)


Started PATCH "/tasks/8/status" for ::1 at 2017-03-26 14:07:58 -0700
Processing by TasksController#status as HTML
Parameters: {"authenticity_token"=>"6EpzX/x9LdL+161A66y5b9Bn8FkOZ+fMeJd/2z0jR2EnCil6bl56I5b4bgqgIwPc2ekWUxy6spZE8rkiCxkEDw==", "id"=>"8"}
Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]]
 (0.0ms) begin transaction
SQL (0.2ms) UPDATE "tasks" SET "completion_date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["completion_date", 2017-03-26 21:07:58 UTC], ["updated_at", 2017-03-26 21:07:58 UTC], ["id", 8]]
 (1.2ms) commit transaction
Redirected to http://localhost:3000/tasks
Completed 302 Found in 4ms (ActiveRecord: 1.5ms)


Started GET "/tasks" for ::1 at 2017-03-26 14:07:58 -0700
Processing by TasksController#index as HTML
Rendering tasks/index.html.erb within layouts/application
Task Load (0.2ms) SELECT "tasks".* FROM "tasks"
Rendered tasks/index.html.erb within layouts/application (4.1ms)
Completed 200 OK in 23ms (Views: 21.4ms | ActiveRecord: 0.2ms)


Started GET "/tasks/8" for ::1 at 2017-03-26 14:08:01 -0700
Processing by TasksController#show as HTML
Parameters: {"id"=>"8"}
Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]]
Rendering tasks/show.html.erb within layouts/application
Rendered tasks/show.html.erb within layouts/application (0.8ms)
Completed 200 OK in 21ms (Views: 18.4ms | ActiveRecord: 0.1ms)


Started GET "/" for ::1 at 2017-03-26 14:08:06 -0700
Processing by WelcomeController#index as HTML
Rendering welcome/index.html.erb within layouts/application
Rendered welcome/index.html.erb within layouts/application (0.5ms)
Completed 200 OK in 21ms (Views: 19.4ms | ActiveRecord: 0.0ms)


Started GET "/tasks" for ::1 at 2017-03-26 14:08:10 -0700
Processing by TasksController#index as HTML
Rendering tasks/index.html.erb within layouts/application
Task Load (0.2ms) SELECT "tasks".* FROM "tasks"
Rendered tasks/index.html.erb within layouts/application (5.3ms)
Completed 200 OK in 29ms (Views: 25.3ms | ActiveRecord: 0.2ms)