Skip to content

Conversation

@galestorm
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 The model communicates with the database. It also handles the business logic of your application.
Describe in your own words what the Controller is doing in Rails The controller is an intermediary that processes requests from the client to pass on to the server, and processes responses from the server to pass back to the client.
Describe in your own words what the View is doing in Rails The view generates the interface/display the user sees
What is the purpose of using strong params? (i.e. the params method in the controller) Strong params are part of "defensive programming" because they allow you to control exactly what model attributes are updated when.
How are Rails migrations related to Rails models? When you run a migration, you make a new model or make a change to a model's schema
Describe one area of Rails that are still unclear on When we did Ada Books and TaskList, why was there no code associated with the model (all the Ruby was hanging out in the controller)? I'm also not 100% clear on variable scope in rails, since files seem to just magically have access to variables in other files. I would also like to know more about different database management systems and more about what it is like to take an application from development to production.

@CheezItMan
Copy link

CheezItMan commented Oct 2, 2017

Task List

What We're Looking For

Hello Gale,

Dee & I are swapping for feedback and 1-1s for the Rails unit, so I'll be doing your feedback until the JavaScript unit.

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in Decent number of commits and good commit messages.
Answered comprehension questions Check, We didn't put code in the model since we haven't added any business logic in our books or TaskList applications. Later when we do validation and make more complicated apps, we will add methods to our model classes. We won't talk too much about other databases, but you'll have some experience with them in your Capstone. You will also practice moving apps to production in the upcoming week I believe. We'll deploy apps to Heroku.
Successfully handles: Index, Show Check
Successfully handles: New, Create Check, but I find the scrollbars in the edit screen a bit unattractive.
Successfully handles: Edit, Update Check
Successfully handles: Destroy, Task Complete Check, but instead of doing a confirmation page you could instead make your link_to look like this: <%= link_to 'delete', delete_path(@task.id), data: {:confirm => 'Are you sure?'} %> That will cause a pop-up dialog to confirm.
Routes follow RESTful conventions Yes, except for delete actions.
Uses named routes (like _path) Check
Overall Nice work, except for small nitpicks on the styling and the delete action, you did really well. I would suggest using fewer div elements and instead using semantic html tags. I also left some comments in your code on minor suggestions.

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.

Some minor comments.

end

def create
@task = Task.new( name: params[:task][:name], description: params[:task][:description], date: params[:task][:date], completion_date: nil )

Choose a reason for hiding this comment

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

This is a good place for strong params

end

def show
@task = Task.find( params[:id].to_i )

Choose a reason for hiding this comment

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

I would suggest having some sort of if statement here for if the task doesn't exist and redirecting them when that happens. The same would apply for edit, create, update and delete.

task.completion_date = nil
end

task.save

Choose a reason for hiding this comment

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

I would also suggest checking just to make sure it saved correctly.

@@ -0,0 +1,28 @@
<body>

Choose a reason for hiding this comment

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

This is done in the layout file, not in the views.

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