From dd5b0ea9e17c3fe740b78dd56f8bcb5a9224d2c3 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 20 Feb 2013 13:41:10 -0500 Subject: [PATCH] fix capistrano and readme --- README.md | 12 +++++++++--- lib/seed-fu-mongoid/capistrano.rb | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index febe227..e45eee8 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,15 @@ No tests whatsoever but it works with my very simple Seed Fu-like seed data, so Seed files in `db/fixtures/*.rb`: ``` ruby -PermissionType.seed(id: 1, type: 'Users') -PermissionType.seed(id: 2, type: 'Sites') -PermissionType.seed(id: 3, type: 'Cats') +PermissionType.seed do |s| + s.id = 1 + s.type = 'Users' +end + +PermissionType.seed do |s| + s.id = 2 + s.type = 'Sites' +end ``` Then `rake db:seed_fu` if you're in Rails. diff --git a/lib/seed-fu-mongoid/capistrano.rb b/lib/seed-fu-mongoid/capistrano.rb index d594deb..ffb2ae1 100644 --- a/lib/seed-fu-mongoid/capistrano.rb +++ b/lib/seed-fu-mongoid/capistrano.rb @@ -2,7 +2,7 @@ Capistrano::Configuration.instance.load do namespace :db do desc "Load seed data into Mongoid database" task :seed_fu do - run %{cd "#{current_path} && bundle exec rake RAILS_ENV=#{rails_env} db:seed_fu"} + run %{cd #{release_path} && bundle exec rake RAILS_ENV=#{rails_env} db:seed_fu} end end