fix capistrano and readme
This commit is contained in:
parent
fd84bee21a
commit
dd5b0ea9e1
12
README.md
12
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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue