Skip to content

Leah - Water#55

Open
scottzec wants to merge 17 commits intoAda-C14:masterfrom
scottzec:master
Open

Leah - Water#55
scottzec wants to merge 17 commits intoAda-C14:masterfrom
scottzec:master

Conversation

@scottzec
Copy link

@scottzec scottzec 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 is the method of our controller, an action that it takes
Describe in your own words what the Controller is doing in Rails The controller is the manager of the application: it takes requests from the server, uses the models to pull info and displays that info to the views for the user.
Describe in your own words what the View is doing in Rails The view is what the user of the application sees
Describe an edge-case controller test you wrote The update model will redirect to the root page if given an invalid id but valid params
What is the purpose of using strong params? (i.e. the params method in the controller) Using strong params is a safer way to have more control over what data comes from our forms. It also saves us time because we set them up once for our controller and then we don't have to set up each field individually as we did in this project (I left mine as not strong params so I have the example)
How are Rails migrations related to Rails models? A migration is a change to a database's structure. The models act on the data stored in the database.
Describe one area of Rails that are still unclear on Everyone once in awhile I have to restart the rails server after I update something for it to be reflected on my application but I can't figure out what makes it so. It seems completely inconsistent to me. I am still trying to figure that one out :)

Copy link

@kaidamasaki kaidamasaki left a comment

Choose a reason for hiding this comment

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

Great job! You've made a Rails app!

It's on the small side but that doesn't make it any less impressive!

Congrats! You're now a full stack developer!

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 custom styles.
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 ✔️
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 No tests on toggle.

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

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

NOTE: There's not a lot of wiggle room in TaskList to be clever/

return
# save failed, task not inserted in db successfully
else
render :new # shows add new task form again to try again

Choose a reason for hiding this comment

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

It's helpful to indicate it was a bad request when you re-render.

Suggested change
render :new # shows add new task form again to try again
render :new, status: :bad_request # shows add new task form again to try again

redirect_to task_path(@task.id) # take the user to the show page for the task that was just updated
return
else
render :edit # shows edit task form again to try again

Choose a reason for hiding this comment

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

Suggested change
render :edit # shows edit task form again to try again
render :edit, status: :not_found # shows edit task form again to try again

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