Skip to content

Conversation

@ayjlee
Copy link

@ayjlee ayjlee commented Oct 1, 2017

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 our Task List's data and the state of the data, and allows us to read or write in our database in Postgresq.
Describe in your own words what the Controller is doing in Rails The Controller holds variables and logic for what needs to happen/how to proceed from actions that happen in the View, through the Model, to the database, and vice versa.
Describe in your own words what the View is doing in Rails The View holds the content, usually HTML, that will be displayed in the browser. Any content, form, or display that a user on a browser can interact with will be in the View.
What is the purpose of using strong params? (i.e. the params method in the controller) We use strong params to ensure that any user can only read or edit the information for which we give them permission by setting requirements and permissions. This is helpful for security reasons, to help prevent any average user from being able to access or edit all of the information in the database of an app (which can hold private, personal data), and to help prevent users from being able to upload a virus into our database.
How are Rails migrations related to Rails models? Rails migrations will create changes or updates to the structure of Rails models.
Describe one area of Rails that are still unclear on Separation of concerns between Model, View, and Controller. For instance, I have a lot of conditional statements in my html.erb files that are in my Views that create different displays based on whether or not a task is complete, but as I understand it, any kind of logic for the flow between browser and the Model/View should be stored in the Controller, and any state changes should be communicated to the View from the controller. What would proper separation of concerns between the MVC look like in this case?

@CheezItMan
Copy link

CheezItMan commented Oct 2, 2017

Task List

What We're Looking For

Hello Amy, Dee & I are switching off for this unit on feedback and 1-1s. So I'll do you feedback for the Rails unit.

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in Decent number of commits, but avoid using waves for commit messages, and instead focus on the functionality achieved.
Answered comprehension questions Check, I would like to point out that the model should also hold the business logic, like classes in regular Ruby apps. You can do if statements in your views, but only to determine how things are displayed.
Successfully handles: Index, Show Check
Successfully handles: New, Create Check
Successfully handles: Edit, Update Check
Successfully handles: Destroy, Task Complete Check, I see you left a confirmation page, but figured out the way around it. Confused me for a bit.
Routes follow RESTful conventions Check, except for the mark complete and your extra confirmation page.
Uses named routes (like _path) check
Overall Nice work, I like how you styled the pages. Everything works as expected. Very good.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Just some comments.

<% if action_name == "Edit" %>
<section class = "input">
<%= f.label "Completed?" %>:
<%= f.select(:status, [true, false]) %>

Choose a reason for hiding this comment

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

This doesn't seem to default to the current value of status.

You could instead do:
<%= f.select(:status, [true, false], {selected: @task.status}) %>

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