Reflection
-
What went well? As I near the end of my WAVE3 requirements. I feel proud of how I've grown to understand the relationships between all of the Rails documents. I now know how to connect and use my routes properly.
-
What are you still working on understanding better? I drew out a map of what I wanted in my finished product. I wasn't sure how to add a checkbox in my views- that would then connect to my completed_at logic. I see now that I could probably insert a button that has logic tied to it when it should displayed. As in, display edit, delete, task only when task isn't completed. I also haven't really touched or worked on improving the look and feel of this assignment. I wanted to make sure I hit all of my requirements before working on changing any CSS. I can also see where has_many relationships discussed in ERD video may be able to make adding this logic easier.
-
What did your chair pair do differently? I spent time researching how to add in a check_box to my forms. My chair pair used a button and I see in the notes below here. That despite the description, I could have used a button instead. Only needing to add a completed route vs creating an entirely new model to hold if the task is completed/has check_box.
We are going to build a Task List in Rails. This web application will enable us to keep track of list of tasks with the functionality to add, edit and remove tasks from a list.
Tracking tasks in a web app will let us focus on following Rails conventions and learning how data flows through a Rails application.
Once you've achieved this baseline, take a walk around the room and see if you can answer questions or help other folks.
This project...
- Will have our standard Github setup (fork this repo and clone to your machine)
- requires you to create a Rails application
- create a controller for your
Tasks - conform to Rails conventions on naming and inflection
- create a controller for your
Baseline Part 2:
- create a
Taskmodel and migration.- create the database schema and tables with
rake db:migrate - the
Taskmodel should include at least a name, a description and a completion indicator
- create the database schema and tables with
Tinker with your Model in the rails console in order to ensure you have created your model and can interact with it as expected.
Each task record will include all of the following. Optional in this context means that the user may choose not to provide this information, but it is still required for your schema:
- Self-incrementing identifier (ID)
- title: the title of the task
- description: details about the task
- completed_at: the time and date the task was completed
This wave is where we will introduce the view layer to interact with our application via the browser.
- Set up necessary controller(s) and route(s) that you will need in order to show a task from the database
- Create a root route for your application that directs users to the list of all tasks
- Each task name in the list should link to a
showaction that will render a new view for the user. - The
showview should include the complete information about the task: name, description, completion status, and completion date.
- Each task name in the list should link to a
- All markup in all views should have semantic relevance.
In this wave we will add the first set of user interactivity and persistence.
- Be able to create a new task:
- The home page should contain a link to Add a new task. This will give the user a form to fill out with the appropriate task fields.
- After the new task is added, the site should take the user back to the home page which displays the full list of tasks. The new task that was just added should be included in the full list of tasks.
- Be able to delete an existing task:
- Add a route and controller action whose responsibility is deleting a task (RESTful routes)
- On the home page, add a button or link for each task that will, once clicked...
- Ask the user to confirm that they definitely want to delete the task.
- Delete the task from the database and redirect the user back to the list of remaining tasks
In this wave we will extend the interactivity with users, allowing them to edit existing tasks in a couple of different ways. As always, follow RESTful conventions when implementing these features.
- Add the ability for the user to mark a task complete
- Add a button to the list of tasks on the home page that, when clicked, will mark a task complete.
- Update the database with the task's completed date
- Add the ability for the user to edit a task's details.
- Add an
editaction that renders a form allowing the user to update all the fields of a task. - Submitting the form from the
editaction should update the existing task; not create a new one.- Research: ActiveRecord's
updatemethod.
- Research: ActiveRecord's
- Link to the
editaction from the task'sshowpage. - DRY up your code by reusing the view code from the
newfunctionality- Hint: Rendering partials in Rails.
- Add an