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

Fix the errors when incrementing the counter value #1003

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

belgoros
Copy link
Contributor

@belgoros belgoros commented Jul 12, 2023

  • the name of the action in the CounterController should be :count instead of :home in router.ex

- the name of the action in the CounterController should be :count instead of :home
- when passing a value via query parameters, it fails to be updated because the type of the @counter is of type String
- add the helper method to the CounterHTML component to convert the String to Integer
- remove to_number/1 (fixed in the controller, see demos/counter)
- remove the call to to_number/1 in the count.html.heex template
@BrooklinJazz BrooklinJazz merged commit 3787b6b into DockYard-Academy:main Jul 20, 2023
2 checks passed
@BrooklinJazz
Copy link
Contributor

Good work!

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