You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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. 💙
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:
However, it REALLY looks more like this:
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
The text was updated successfully, but these errors were encountered: