Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby sinatra helper

helpers do
  def bar(name)
    "#{name}bar"
  end
end

get '/:name' do
  bar(params[:name])
end
Source by sinatra-org-book.herokuapp.com #
 
PREVIOUS NEXT
Tagged: #ruby #sinatra #helper
ADD COMMENT
Topic
Name
2+7 =