Skip to content

task-list#50

Open
crypt0kitty wants to merge 7 commits intoAda-C14:masterfrom
crypt0kitty:master
Open

task-list#50
crypt0kitty wants to merge 7 commits intoAda-C14:masterfrom
crypt0kitty:master

Conversation

@crypt0kitty
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
Describe in your own words what the Controller is doing in Rails
Describe in your own words what the View is doing in Rails
Describe an edge-case controller test you wrote
What is the purpose of using strong params? (i.e. the params method in the controller)
How are Rails migrations related to Rails models?
Describe one area of Rails that are still unclear on

Copy link

@kaidamasaki kaidamasaki left a comment

Choose a reason for hiding this comment

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

Great job! You've made a Rails app!

It's on the small side but that doesn't make it any less impressive!

Congrats! You're now a full stack developer!

You look like you had a little trouble with Wave 4 but definitely met the learning goals for it. 😃

Note: Please do the comprehension questions in the future. They're good for us to be able to read over to make sure you've got a good grasp on the conceptual parts of the projects.

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 ✔️ (Some of your commit messages are borderline, please be more descriptive in the future)
Routes follow RESTful conventions ✔️
Uses named routes (like _path) ✔️
Creates Models and migrations ✔️
Creates styled views No custom CSS.
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 ✔️
Edit, Update tests pass with valid & invalid task ids ✔️
Successfully handles: Destroy, Task Complete ✔️
Tests for Destroy & Task Complete include tests for valid and invalid task ids

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 5+ in Code Review && 6+ in Functional Requirements ✔️
Yellow (Approaches Standards) 3+ in Code Review && 5+ in Functional Requirements, or the instructor judges that this project needs special attention
Red (Not at Standard) 0-2 in Code Review or 0-4 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging, or the instructor judges that this project needs special attention

Code Style Bonus Awards

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

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

end

def update
@task = Task.find_by_id(params[:id])

Choose a reason for hiding this comment

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

Nice use of find_by_id!

end

if @task.destroy
flash[:success] = 'It worked!'

Choose a reason for hiding this comment

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

Flash! 🎉

expect(example_task.completed_at).wont_be_nil

must_respond_with :redirect
must_redirect_to tasks_path

Choose a reason for hiding this comment

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

This test is basically correct you had one small error.

In your controller you redirected to "/" not "/tasks".

Suggested change
must_redirect_to tasks_path
must_redirect_to root_path

Comment on lines +67 to +68
task = Task.find_by_id(params[:id])
if task.completed_at.nil?

Choose a reason for hiding this comment

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

You forgot to check if task was nil before checking task.completed_at:

Suggested change
task = Task.find_by_id(params[:id])
if task.completed_at.nil?
task = Task.find_by_id(params[:id])
if task.nil?
redirect_to action: :index
return
end
if task.completed_at.nil?

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