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 trial

Ruby

Challenge Task 1 Route Priority, Random Number of fish

For this challenge, I honestly have no clue how to fix it. Has anyone got to the challenge that requires you to produce a random number of fish?

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there again! The key here lies in the order of the definitions. The definition for the /:number/fish is currently first. This means that when a user types in /random/fish they will receive "I see random fish!" which isn't exactly what we're after. This can be cleared up with some good old cut/paste. Simply move the /:number/fish definition below the /random/fish definition. This ensures that the /random/fish happens first.

Hope this helps! :sparkles: