Skip to content

Commit

Permalink
database url from heroku support
Browse files Browse the repository at this point in the history
  • Loading branch information
terrbear committed Feb 22, 2010
1 parent 49e7b72 commit 8374647
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion environment.rb
Expand Up @@ -20,7 +20,8 @@
:url_base => 'http://localhost:4567/'
)

DataMapper.setup(:default, "sqlite3:///#{File.expand_path(File.dirname(__FILE__))}/#{Sinatra::Base.environment}.db")
sqlite3_file = "sqlite3:///#{File.expand_path(File.dirname(__FILE__))}/#{Sinatra::Base.environment}.db"
DataMapper.setup(:default, ENV['DATABASE_URL'] || sqlite3_file)

# load models
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib")
Expand Down

0 comments on commit 8374647

Please sign in to comment.