Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSteve Torrens
3,826 PointsChanged the route definition order but not getting a correct answer
Hi,
For the fish.rb question I changed the route definition order, with the /random/fish route ahead of the /:humber/fish route. I tested the code on my machine and it looks like it works. Does this question have a bug?
require "sinatra"
get "/random/fish" do
"I see #{rand(20)} fish!"
end
get "/:number/fish" do
"I see #{params[:number]} fish!"
end
1 Answer
Jay McGavren
Treehouse TeacherThere was an error with this challenge that we just fixed. Try again now. Your code should pass as-is. Sorry for the trouble!
Steve Torrens
3,826 PointsThanks Jay!! All working now. FYI : I am enjoying the ruby course. Cheers, Steve
Steve Torrens
3,826 PointsSteve Torrens
3,826 PointsHi,
The link to the question is :
https://teamtreehouse.com/library/building-web-apps-with-sinatra/adding-new-data/route-priority
Cheers, Steve