Skip to content

Conversation

@wangjoc
Copy link

@wangjoc wangjoc commented May 5, 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 database in rails, which allows you to store data to be presented through the show actions and views
Describe in your own words what the Controller is doing in Rails The controller hold all of the show actions, acting as a sort of central command. Each action (such as new, update, create, etc.) requires a corresponding funciton in the controller.
Describe in your own words what the View is doing in Rails The view files determine how what the brower actually presents. While the file is primarily in html, you can embed ruby code in it as well to allow for more functionality (such as switching from completed to not completed), as well as call functions.
Describe an edge-case controller test you wrote An example of an edge case test would be testing to see make sure the show action for a non-existent test redirect appropriately.
What is the purpose of using strong params? (i.e. the params method in the controller) Strong params prevents people from passing in bad code or inputs into the app (i.e. malicious code intended to crash the website).
How are Rails migrations related to Rails models? Rails migrations allow you to make changes to the strucutre of the rails models (i.e. create or delete columns, or change column type).
Describe one area of Rails that are still unclear on I'm still unclear about styling and how to be more efficient about creating custom actions.

@beccaelenzil
Copy link

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, but not required
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 ✔️
Successfully handles: Destroy, Task Complete ✔️

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 5+ in Code Review && 5+ in Functional Requirements ✔️

Code Style Bonus Awards

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

Quality Yes?
Descriptive/Readable
Concise
Logical/Organized

Copy link

@beccaelenzil beccaelenzil left a comment

Choose a reason for hiding this comment

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

Good work overall. It is clear that the learning goals around implementing MVC with the rails framework were met. With your next project you'll have an opportunity to implement some of the new concepts and add styles to enhance the user experience. Keep up the hard work.

get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task'
patch '/tasks/:id', to: 'tasks#update'
delete '/tasks/:id', to: 'tasks#destroy'
patch '/tasks/:id/completed', to: 'tasks#completed', as: 'completed_task'

Choose a reason for hiding this comment

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

Consider how making two separate methods, for instance mark_complete and mark_incomplete would make this action idempotent.

<%= link_to "Task ##{task[:id]}" , task_path(task[:id]) %><br>
<%= task[:name] %> must <%= task[:description] %><br>
<%= button_to "Edit Task", edit_task_path(task[:id]), method: :get %>
<%= button_to "#{task.task_completed ? "Completed" : "Not Completed"}", completed_task_path(task.id), method: :patch %>

Choose a reason for hiding this comment

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

Consider changing the names on these buttons to Mark Complete and Mark Incomplete to make it clearer what happens when you click the button. You could use a strike-through to indicate when a task is complete.

Choose a reason for hiding this comment

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

Good use of a ternary!

@@ -0,0 +1,8 @@
<h1>Specific Task</h1>

Choose a reason for hiding this comment

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

Once you're on the show page, there's no easy way to get back to the index view. You could add a link to the show view, or add a nav bar to the application view in layouts.

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