-
Notifications
You must be signed in to change notification settings - Fork 43
Pipes - Sara Frandsen - TaskList #45
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
base: master
Are you sure you want to change the base?
Conversation
Task ListWhat We're Looking For
|
| @task = Task.find(params[:id]) | ||
| end | ||
|
|
||
| def all |
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.
This action seems to be doing the same thing as the index action. Is there a reason to have this one as well?
| def create | ||
| task = Task.new(task: params[:task][:task], description: params[:task][:description], due: params[:task][:due], status: false) | ||
| task.save | ||
| redirect_to('/tasks') |
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.
Ideally here we would use redirect_to tasks_path instead. It should work the same way as this line does, but is more flexible if we for some reason need to change the URL that maps to the Tasks#index action.
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions