Skip to content

Instantly share code, notes, and snippets.

@tooky
Created March 14, 2009 06:58
Show Gist options
  • Save tooky/79000 to your computer and use it in GitHub Desktop.
Save tooky/79000 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'activerecord'
configure :development do
set :db, {:adapter => 'sqlite3', :dbfile => 'shout.dev.sqlite3.db'}
end
configure :production do
set :db, {:adapter => 'sqlite3', :dbfile => 'shout.sqlite3.db'}
end
configure :testing do
set :db, {:adapter => 'sqlite3', :dbfile => ':memory:'}
end
configure do
ActiveRecord::Base.establish_connection(options.db)
end
class Layout < ActiveRecord::Base; end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment