Browse Source

Use _config.rb file for env vars

tags/v2.0.0
Adrian Short 6 years ago
parent
commit
828fc82c97
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      models.rb

+ 2
- 1
models.rb View File

@@ -1,4 +1,5 @@
require 'data_mapper' require 'data_mapper'
load '_config.rb'


class Poll class Poll
include DataMapper::Resource include DataMapper::Resource
@@ -269,5 +270,5 @@ class Party
has n, :campaigns has n, :campaigns
end end


DataMapper.setup(:default, ENV['DATABASE_URL'] || "postgres://postgres@localhost:5432/suttonelections")
DataMapper.setup(:default, ENV['DATABASE_URL'])
DataMapper.auto_upgrade! DataMapper.auto_upgrade!

Loading…
Cancel
Save