Paige Jones17,641 Points
anyone able to finish this challenge? completed the rest but i stumped here.
Ive finished the sinatra course and was able to complete the other challenges but this one has me feeling lost.
Hello Paige, sorry for the Delayed replay;
you see your code here is perfect:
h1><%= @word %></h1> <p>Backwards: <%= @word.reverse %> </p> <p>Uppercase: <%= @word.upcase %></p> <p>Length: <%= @word.length %></p>
the issue is in the APP.erb file. nice Job it was just a small bobo,
require 'sinatra' get "/:word" do @word = params[:word] *** :**** end
ok, so the ***** is a missing line in your code to point(redirect) to the HTML template.
the link if you need refresh; https://teamtreehouse.com/library/getting-html-from-a-template
Hello! the challenge consists of two part;
1.from the URL you have to save to a variable whatever word after the "/" : you can just this video: https://teamtreehouse.com/library/url-parameters start from 2nd min!
2.the instance variable that you just created you will use it in the word.erb. and manipulated as it s required by using the method mentioned in the challenge: .reverse .upcase .length
Hope that Helps ! :)