Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ania's tasklist in rails #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

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