Ready first version of reusable apps dispatching.

This commit is contained in:
Wlodek Bzyl 2009-06-02 00:03:22 +02:00
parent 3291a5d8ce
commit 3f35b8a929
3 changed files with 0 additions and 48 deletions

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
require 'sinatra/base'
gem 'sinatra-static-assets'
require 'sinatra/static_assets'
module Sinatra
class Mapp1 < Sinatra::Base
helpers Sinatra::UrlForHelper
helpers Sinatra::StaticAssets
set :app_file, __FILE__
set :static, true
#set :root, File.dirname(__FILE__)
#set :views, Proc.new { File.join(root, "views") }
get '/' do
@title = "Tatra Mountains, Błyszcz (2159 m)"
erb :app
end
end
end

View File

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
require 'sinatra/base'
gem 'sinatra-static-assets'
require 'sinatra/static_assets'
module Sinatra
class Mapp2 < Sinatra::Base
helpers Sinatra::UrlForHelper
helpers Sinatra::StaticAssets
set :app_file, __FILE__
set :static, true
get '/' do
@title = "Tatra Mountains, Dolina Gąsienicowa (1500 m)"
erb :mapp
end
end
end

View File

@ -1,3 +0,0 @@
<h2><%= @title %></h2>
<p><%= image_tag "/images/tatry2.jpg", :closed => true, :alt => @title, :title => @title %></p>