Sha256: c9652cae71d3b5b6feb94f66512a41feb1ac04877bc60882bfa62b99993d443a

Contents?: true

Size: 451 Bytes

Versions: 2

Compression:

Stored size: 451 Bytes

Contents

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'helmet'

class Misc < Helmet::API
  
  use Rack::Static,
    :root => config(:public_folder),
    :urls => ['/css']

  get '/' do
    erb(:index, 
      {:layout => :layout}, 
      {:data => session[:data]})
  end
  
  post '/session' do
    session[:data] = env['params']['session']
    erb(:index, 
      {:layout => :layout}, 
      {:data => session[:data]})
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
helmet-0.2.1 examples/misc.rb
helmet-0.2.0 examples/misc.rb