Skip to content

Time - Haben#26

Open
HabenFoto wants to merge 29 commits intoAda-C13:masterfrom
HabenFoto:master
Open

Time - Haben#26
HabenFoto wants to merge 29 commits intoAda-C13:masterfrom
HabenFoto:master

Conversation

@HabenFoto
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 Model is where our data and state for application live. It has no knowledge of UI for future usage.
Describe in your own words what the Controller is doing in Rails The Controller receives events as requests from the user, gathers data from the model and pass data to the view to be rendered in HTML.
Describe in your own words what the View is doing in Rails The View turns the data received from the Controller into HTML and displays it.
Describe an edge-case controller test you wrote N/A
What is the purpose of using strong params? (i.e. the params method in the controller) We use strong params within our controllers to provide a safe way to require and permit data that comes from our forms.
How are Rails migrations related to Rails models? Migrations are a convenient way for us to alter our database in a structured and organized way. Through Migration we are able to add or remove tables, columns, and rows in Model.
Describe one area of Rails that are still unclear on I think the fact that there are a lot of moving parts interacting with each other, is a little too much to grasp in this short amount of time. But I’m sure if I get to work on it specifically, I can have a better understanding.

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.

Great work on this project! You're off to a great start with rails and it's clear the learning goals were met. Nice work incorporating strong_params and resources. Keep up the hard work!


end

def completed_at

Choose a reason for hiding this comment

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

Consider naming this controller action something like mark_complete to avoid confusion between the completed_at attribute and the completed_at action.

Choose a reason for hiding this comment

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

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

<div class="buttons">
<%= button_to "Edit Task", edit_task_path(task[:id]), method: :get %>
<%= button_to "Delete Task", task_path(task[:id]), method: :delete, data: {confirm: "Are you sure you want to Delete?"} %>
<%= button_to "#{task.completed_at ? "Completed Task" : "Task 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.

Nice use of a ternary for conditionally showing different text based on the state of the task! Consider naming these buttons something like "Mark Complete" and "Unmark Complete" to add clarity to the user exeperience.

@@ -0,0 +1,15 @@
<div>
<h3 class="index_title">Tasks to be Completed</h3>

Choose a reason for hiding this comment

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

Minor note: this title is a little misleading because you include all tasks (completed and not) in the list.

// You can use Sass (SCSS) here: https://sass-lang.com/
@import "bootstrap";

// @import "**/*";

Choose a reason for hiding this comment

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

Nice work adding styling! Minor note: before you have any tasks, some of your links overlap with eachother.

@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 ✔️ Good use of resources!
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 ✔️
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

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