aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-18 23:26:18 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-21 11:00:34 +0200
commit70e7a3efbae388ca189ecc8c1b10619201f41d01 (patch)
tree5f35e2697ffc3f5b006b038612c6ab8ba5351767
parentUse factory_girl_rails, don't require factories manually (diff)
downloadcouncil-webapp-70e7a3efbae388ca189ecc8c1b10619201f41d01.tar.gz
council-webapp-70e7a3efbae388ca189ecc8c1b10619201f41d01.tar.bz2
council-webapp-70e7a3efbae388ca189ecc8c1b10619201f41d01.zip
Use custom change in hobo to solve problem with db:reset task
-rw-r--r--site/Gemfile.lock2
-rw-r--r--site/db/seeds.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/site/Gemfile.lock b/site/Gemfile.lock
index d2a4c5a..277f060 100644
--- a/site/Gemfile.lock
+++ b/site/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/ahenobarbi/hobo.git
- revision: b33a9a69a2e1ce09b98c00ecee6c51bd1459fee5
+ revision: c9c13eb614a3c4a699a59d02e4757c2cdd682988
branch: rails3
specs:
dryml (1.3.0)
diff --git a/site/db/seeds.rb b/site/db/seeds.rb
index 40e1a11..a6393c8 100644
--- a/site/db/seeds.rb
+++ b/site/db/seeds.rb
@@ -19,6 +19,11 @@ yml_seed_path = File.expand_path("../seed.yml", __FILE__)
yml_seed_file = File.open(yml_seed_path)
seed = YAML::load(yml_seed_file)
+[Agenda, AgendaItem, Participation, Proxy, User, Vote, VotingOption].each do |model|
+ # Refresh table_exists cache for all models
+ model.table_exists?(true)
+end
+
seed.each do |agenda_desc|
state = agenda_desc['state']
agenda = state.nil? ? nil : Factory(:agenda, :state => state)