Skip to content

Conversation

@enigmagnetic
Copy link

Task List

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words what the Model is doing in Rails The Model tracks data and state and contains business logic.
Describe in your own words what the Controller is doing in Rails The Controller interacts with both the Models and the Views and decides what to do next in the application flow based on input.
Describe in your own words what the View is doing in Rails The View generates templates to get input from the user and display data and state to user.
What is the purpose of using strong params? (i.e. the params method in the controller) Strong params help to DRY the code by abstracting the param hash structure to a private method, and allowing attribute creation or updating for the fields specified from each method that uses them.
How are Rails migrations related to Rails models? Migrations are a way to create and update database fields for the model's data.
Describe one area of Rails that are still unclear on I had trouble applying styling to erb elements, but made some progress. At the moment I'm unclear on how an application with multiple models and controllers would work together.

…date date column names to snake_case, update index view.
… done message if task has been marked complete.
… return to task list if succesful. Date selector is not passing due_date value to ActiveRecord.
…omplete. Add complete_task_path to routes. Fix complete? method in task model. Feature working.
@tildeee
Copy link

tildeee commented Oct 6, 2017

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in x
Answered comprehension questions x
Successfully handles: Index, Show x
Successfully handles: New, Create x
Successfully handles: Edit, Update x
Successfully handles: Destroy, Task Complete x
Routes follow RESTful conventions x
Uses named routes (like _path) x
Overall

@tildeee
Copy link

tildeee commented Oct 6, 2017

I couldn't find where the partials _complete and _incomplete were used?

Good work on this overall, I'm leaving a few comments but I think overall this is great

<p class="task_details">Description: <%= task.description %></p>
<br>
<%= link_to image_tag("edit_pencil.png", alt: "edit button"), edit_task_path(task.id), method: :get %>
<%= link_to image_tag("delete.png", alt: "delete button"), delete_task_path(task.id), method: :delete, data: { confirm: "Delete task?" } %>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This confirmation alert is really cool!

@task = Task.new(task_params)

if @task.save
flash[:notice] = "Task saved"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice use of flash, but you don't end up using this at all in the view!

We'll be going over flash formally next week

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering why it wasn't showing...

def destroy
Task.find_by(id: params[:id]).destroy

redirect_to root_path, notice: "Task deleted."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool that you're setting notice, but this doesn't end up getting used on the view at all

@enigmagnetic
Copy link
Author

I didn't end up using the _incomplete and _complete partials, then forgot to delete the files 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants