Ready first version of reusable apps dispatching.
This commit is contained in:
parent
3291a5d8ce
commit
3f35b8a929
|
@ -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
|
|
@ -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
|
|
@ -1,3 +0,0 @@
|
|||
<h2><%= @title %></h2>
|
||||
|
||||
<p><%= image_tag "/images/tatry2.jpg", :closed => true, :alt => @title, :title => @title %></p>
|
Loading…
Reference in New Issue