-
Notifications
You must be signed in to change notification settings - Fork 22
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
Anna Task List Rails #9
base: master
Are you sure you want to change the base?
Conversation
…ll count uncompleted tasks
@task.save | ||
redirect_to root_path | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update_edit method looks good, but will look even better if you'll DRY your code.
you can move the ' @task = Task.find(params[:id]) ' => move before the 'if statement'
you can also move the :
@task.save
redirect_to root_path
out of the if statement, since you'll execute it anyway.
Your code is well written- Good job! |
I'm happy that this works at all!!! I learned a lot about Rails (like - everything I know at this point) by doing this project. Good practice.
If I had more time, I'd like to go in and refactor/edit/streamline my code. But for now - I'm happy it works at all :)
Heroku: http://anna-tasks.herokuapp.com/