|
@@ -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! |