fix capistrano and readme

This commit is contained in:
John Bintz 2013-02-20 13:41:10 -05:00
parent fd84bee21a
commit dd5b0ea9e1
2 changed files with 10 additions and 4 deletions

View File

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

View File

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