Skip to content

Earth - Anya#35

Open
anyatokar wants to merge 8 commits intoAda-C14:masterfrom
anyatokar:master
Open

Earth - Anya#35
anyatokar wants to merge 8 commits intoAda-C14:masterfrom
anyatokar:master

Conversation

@anyatokar
Copy link

@anyatokar anyatokar commented Nov 2, 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 stores and manipulates data which includes accessing the database, validating data, managing Ruby classes.
Describe in your own words what the Controller is doing in Rails The controller manages the flow of the application, mainly taking the data from the model and giving it to the view to be rendered. The controller handles router requests and can make changes to the model.
Describe in your own words what the View is doing in Rails The view handles how data is presented to the consumer, manages templates.
Describe an edge-case controller test you wrote Making sure the complete toggle won't change the task count.
What is the purpose of using strong params? (i.e. the params method in the controller) Strong params allow only select attributes to pass from forms to model methods (therefore limiting fields users can alter). Params save time by allowing us to populate data without having to list out each field.
How are Rails migrations related to Rails models? The first migration results in a table and columns being added to the database and fills the schema which is a snapshot of the database. Subsequent migrations can make changes to the table and columns (and therefore schema as well).
Describe one area of Rails that are still unclear on Would like to review the concepts of "render" and "save". Also, could use practice with general test writing.

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 ✔️
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 No add task on index w/o an existing task :'(
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 ✔️

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 +22 to +27
<% end %>
<%= link_to "Add new task", new_task_path %>
</ul>
<% else %>
<h3>No tasks in the system<h3>
<% end %> 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.

Okay, this is a small thing, but it has big implications!

You left this link_to inside the positive case of the if block!~ Which means, if there are no tasks already in the server's DB, then there is no way to add them! 😱 This is a good reminder that Tests Don't Catch Everything, and that clicking thru a website and trying ALLL the features is important!

Suggested change
<% end %>
<%= link_to "Add new task", new_task_path %>
</ul>
<% else %>
<h3>No tasks in the system<h3>
<% end %>
<% end %>
</ul>
<% else %>
<h3>No tasks in the system<h3>
<% end %>
<%= link_to "Add new task", new_task_path %>

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