sinatra-static-assets/test/sinatra_app.rb
2009-07-05 18:28:12 +02:00

22 lines
344 B
Ruby

require 'rubygems'
require 'sinatra'
require 'sinatra/url_for'
require 'sinatra/static_assets'
get "/url_for" do
content_type "text/plain"
<<"EOD"
#{url_for("/")}
#{url_for("/foo")}
#{url_for("/foo", :full)}
EOD
end
get "/image_tag" do
content_type "text/plain"
<<"EOD"
#{image_tag("/images/foo.jpg", :alt => "[foo image]")}
EOD
end