Passing parameters to erb view
get '/hello/:name' do "Hello #{params[:name]}!"end
You cannot do this in routes.
You want to set the params in the controller.
app/controllers/some_controller.rb
def index params[:name] = "Codeglot" params[:name] = "iPhone" params[:name] = "Mac Book" end
app/views/index.html.erb
<%= params[:name] %><%= params[:phone] %><%= params[:computer] %>