Skip to content

Conversation

@aniagonzalez
Copy link

def destroy
@task = Task.find(params[:id])
@task.destroy
redirect_to root_path #you have to redirect_to instead of render, so that it goes to the route/controller and not only directly to the view (otherwise it would say @tasks is nil, becuase it never created it)

Choose a reason for hiding this comment

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

Good use of redirect. Shows you know the difference b/w redirect and render.

@annaleeherrera
Copy link

Hi Ania! Awesome job on the tasklist!
I noticed you have one huge commit- try and commit every time you hit a good milestone.
Your methods were clear and simple.
You had good use of CRUD in your controllers.
Great job!

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