Created
April 10, 2009 14:44
-
-
Save graemenelson/93109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'imanip' | |
| require 'sequel' | |
| # load the support libraries. loading models gets called in configure | |
| %w( database helpers ).each { |lib| require "lib/#{lib}.rb" } | |
| class MyApp < Sinatra::Default | |
| configure do | |
| set :sessions, !test? | |
| Sequel::Model.db = Database.for_environment( environment ) | |
| load 'lib/models.rb' | |
| end | |
| helpers do | |
| include Helpers # the helpers are defined in lib/helpers.rb | |
| end | |
| get '/' do | |
| haml :home, {:layout => :application} | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment