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 trialalexx1000
16,187 PointsIn hello.rb, in the get route for the "/greet/:name" path, set the @name instance variable to equal the contents of the
Sorry, I'm new here and don't know how to use the different features. I'm confused about what code I should put in this challenge. I hope you can see the question and my ugly code lol Can you please help me? Thanks!! :)
require "sinatra"
get "/greet/:name" do
@name = params[:name]
erb :views
end
<p><%= @name = "Hello" %></p>
2 Answers
AJ Tran
Treehouse TeacherERB is a funny beast, it looks like you got one answer!
This will work the same too:
<p>Hello <%= @name %></p>
alexx1000
16,187 PointsGot the right answer: <p><%= "Hello" + @name %></p>
LOL :)