Skip to content

🌊 - Kayla Johnson - Task List#49

Open
Kaylaj89 wants to merge 16 commits intoAda-C14:masterfrom
Kaylaj89:master
Open

🌊 - Kayla Johnson - Task List#49
Kaylaj89 wants to merge 16 commits intoAda-C14:masterfrom
Kaylaj89:master

Conversation

@Kaylaj89
Copy link

@Kaylaj89 Kaylaj89 commented Nov 3, 2020

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 holds the task data. When a new task is added, it is added to the model. Similarly, when a task is deleted, it is also deleted from the db (model).
Describe in your own words what the Controller is doing in Rails The controller is the 'middle' person between the database and the view. It tells the model what information has been requested and then sends that information from the model to the view.
Describe in your own words what the View is doing in Rails The view is making data come to life via .html.erb.
Describe an edge-case controller test you wrote My rails tests mostly tested nominal cases
What is the purpose of using strong params? (i.e. the params method in the controller) Strong params are used for security purposes so that hackers can't write in their own params. Strong params are defined in their own method and assigned a token.
How are Rails migrations related to Rails models? Active Record migrations are essentially a new version of the database. You can add, remove, or edit a row or column or some value in the model via a migration
Describe one area of Rails that are still unclear on migrations are still a little hazy for me. Also, controller methods can be tricky to write.

Copy link

@dHelmgren dHelmgren left a comment

Choose a reason for hiding this comment

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

Task List

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
At least 6 commits with meaningful commit messages ✔️
Routes follow RESTful conventions ✔️
Uses named routes (like _path) ✔️
Creates Models and migrations ✔️
Creates styled views no styling!
Handles errors like nonexistant tasks ✔️
Uses form_with to render forms in Rails ✔️

Functional Requirements/Manual Testing

Functional Requirement yes/no
Successfully handles index & show cant navigat off of show page
index & show tests pass ✔️
Successfully handles: New, Create ✔️
New, Create tests pass ✔️
Successfully handles: Edit, Update ✔️
Edit, Update tests pass with valid & invalid task ids ✔️
Successfully handles: Destroy, Task Complete ✔️
Tests for Destroy & Task Complete include tests for valid and invalid task ids missing

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 5+ in Code Review && 6+ in Functional Requirements ✔️
Yellow (Approaches Standards) 3+ in Code Review && 5+ in Functional Requirements, or the instructor judges that this project needs special attention
Red (Not at Standard) 0-2 in Code Review or 0-4 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging, or the instructor judges that this project needs special attention

Comment on lines +162 to +171
it "will update the controller with 'completed' to true" do
task = Task.create(name: "Finish Rails homework", description: "Somewhat challenging.", completed_at: "")
id = task.id.to_i

get tasks_complete_path(id)
must_respond_with :redirect

completed_task = Task.find_by(id: id)
expect(completed_task.completed).must_equal true
end

Choose a reason for hiding this comment

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

what if the task doesn't exist?

Comment on lines +1 to +7
<h2><%= @task.name%></h2>
<h3><%=@task.description%></h3>
<ul>
<li><%= link_to "Edit Task", edit_task_path %></li>


</ul> No newline at end of file

Choose a reason for hiding this comment

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

This is a bad user experience! I can't get back to the index page without the URL!

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