Skip to content

BrandiPhillips/TaskListRails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

###Reflection I am still trying to figure out the relationship between the model and the controller. It was my understanding that logic that affects the database goes in the model files... I was able to get the create new and update to work until I got to the part about the button to complete a task. I am still working on that part. I am not very comfortable with how to write the controller methods for various functionality. Alyssa put her button logic in the update method in her controller it's done in a way I imagined doing it but couldn't quite get there on my own. If I had another long study day like yesterday I am sure I would have gotten there on my own... I am still trying to figure out how I can use the server and bash to help me trouble shoot. Also, if you could please find a way to write in like 5 extra hours in the weekend.hours life code that would be great! :)

So, now that the assignment is complete I wanted to add a few things here. I had a hard time figuring out the correct syntax to use for the links and buttons. There seems to be several different ways to create them. I also found it a bit difficult to figure out the correct syntax to use in the controller methods especially when working with the forms. Having the bug helper gem Jamie showed us really helped! After completing the assignment I do feel I have a better overall understanding of rails.

Task List Rails ✅

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.

Baseline

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

Baseline Part 2:

  • create a Task model and migration.
    • create the database schema and tables with rake db:migrate
    • the Task model should include at least a name, a description and a completion indicator

Tinker with your Model in the rails console in order to ensure you have created your model and can interact with it as expected.

Task Data Requirements

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

🌊 Wave 1

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 show action that will render a new view for the user.
    • The show view should include the complete information about the task: name, description, completion status, and completion date.
  • All markup in all views should have semantic relevance.

🌊 Wave 2

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...
      1. Ask the user to confirm that they definitely want to delete the task.
      2. Delete the task from the database and redirect the user back to the list of remaining tasks

🌊 Wave 3

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 edit action that renders a form allowing the user to update all the fields of a task.
    • Submitting the form from the edit action should update the existing task; not create a new one.
      • Research: ActiveRecord's update method.
    • Link to the edit action from the task's show page.
    • DRY up your code by reusing the view code from the new functionality
      • Hint: Rendering partials in Rails.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 53.5%
  • CSS 28.5%
  • HTML 15.3%
  • JavaScript 1.4%
  • CoffeeScript 1.3%