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

The "URL Params" section is misleading about the params hash. #27

Closed
Sdcrouse opened this issue Jun 24, 2019 · 1 comment
Closed

The "URL Params" section is misleading about the params hash. #27

Sdcrouse opened this issue Jun 24, 2019 · 1 comment

Comments

@Sdcrouse
Copy link

Hi. The reason that I'm saying that the "URL Params" section is misleading about the params hash, is because it suggests that the hash looks something like this:

params = {
  :id => 1
}

However, it REALLY looks more like this:

params = {
  :id => "1"
}

I have to bring that minor detail up because it affected how I went about coding the /multiply dynamic route. I had thought that the numbers specified by the user would be stored as integers, not strings. I finally figured out that I needed to use #to_i, but the lesson doesn't mention that at all (although the lesson after it does).

The other thing that I found is that I had to make the response a string, not an integer, or Sinatra would think that I was returning a status code. The lesson doesn't mention this either, but that may be somewhat implied; it says to use their example dynamic route (which returns a string) as a template.

My concern is that this will cause some confusion for other students as well. Thanks (as always) for looking into this!

---Sdcrouse

drakeltheryuujin added a commit that referenced this issue Sep 30, 2019
@drakeltheryuujin
Copy link
Contributor

Thank you for spotting this issue and providing feedback.
We have updated the materials and believe your issue to have been resolved.
If you do not believe that this issue has been addressed, please re-open this issue. 💙

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

No branches or pull requests

2 participants