Creating all the pages and forms was pretty straighforward. I definitely feel more comfortable with routing (but not completely). Having the buttons update the attributes took me a while to figure out, but made sence in the end.
I tried for a long time to have the checkbox control an attribute, but I only managed to get it to display an attribute.
Both of my chair-pairs did more formatting than I did on the display of the list, buttons, etc. I need to be better about doing that, I tend to stop once it's functional.
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