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

142/fix thread link new lesson #151

Merged
merged 4 commits into from
Apr 10, 2018
Merged

Conversation

McEileen
Copy link
Member

@McEileen McEileen commented Apr 6, 2018

Hi @vkoves, could you please review these changes? It fixes both #142 and #140 because when I was trying to figure out the thread link problem, I realized both issues stem from an issue on the controller page's create method. This also made me realize we need to use strong params throughout the application - @kthong3 is on the case.
Are you going to say this change needs testing? If so, I will add tests. 🙏

fixes #142
fixes #140

@vkoves
Copy link
Contributor

vkoves commented Apr 7, 2018

This seems reasonable, but it's generally cleaner to just take the params for creation rather than setting each variable individually. Take a look at how the contacts controller handles creation, as I think that's a little bit nicer and would prevent this type of error from cropping up again.

As for testing, I don't think this change needs it per se, but we should probably have tests around lesson creation that should have caught this. That seems outside of the scope of this PR though

@McEileen McEileen merged commit ffd84ea into master Apr 10, 2018
@McEileen McEileen deleted the 142/fix-thread-link-new-lesson branch April 10, 2018 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants