Skip to content

Conversation

@qqdipps
Copy link

@qqdipps qqdipps commented Apr 15, 2019

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 storing all the information about all the tasks.
Describe in your own words what the Controller is doing in Rails Controller is talking between the model and view.
Describe in your own words what the View is doing in Rails View is rendering HTML pages.
Describe an edge-case controller test you wrote Most of the edge cases concerned what would happen if an invalid task id is used.
What is the purpose of using strong params? (i.e. the params method in the controller) Strong params are way of securing the params so that the params can be passed directly, but only includes permitted values.
How are Rails migrations related to Rails models? Migrations modify with db.
Describe one area of Rails that are still unclear on How multiple models will interact ( I think this is what we are learning this week) and some of the testing was hard to write, but made more sense towards the end.

@CheezItMan
Copy link

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in Good number of commits and good commit messages, nothing extra committed
Answered comprehension questions Check, migrations change the structure of the DB, other commands can add content. I'm glad testing made sense toward the end.
Successfully handles: Index, Show Check
Index & Show tests pass Check
Successfully handles: New, Create Check
New & Create tests pass Check
Successfully handles: Edit, Update Check
Tests for Edit & Update test valid & invalid task ids Check
Successfully handles: Destroy, Task Complete Check
Tests for Destroy & Task Complete include tests for valid and invalid task ids Check
Routes follow RESTful conventions Check
Uses named routes (like _path) For the most part, just not on index.html.erb
Overall Nice work, you hit all the learning goals on this project.

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.

Nice work, good job with testing!

get edit_task_path(3)
must_respond_with :redirect
must_redirect_to tasks_path
expect(flash[:error]).must_equal "Could not find task with id: 3"

Choose a reason for hiding this comment

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

Nice!

def destroy
task_id = params[:id]
task = Task.find_by(id: task_id)
task.destroy if task

Choose a reason for hiding this comment

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

Some sort of feedback if task is nil should be provided to the user.

<ol class="inner_scroll">
<%@tasks.each do |task|%>
<li class="task">
<a href="/tasks/<%=task.id%>"><h3>Task: <span><%= task.name%></span></h3></a>

Choose a reason for hiding this comment

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

You should use link_to here, and a named path.

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