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`:
|
Seed files in `db/fixtures/*.rb`:
|
||||||
|
|
||||||
``` ruby
|
``` ruby
|
||||||
PermissionType.seed(id: 1, type: 'Users')
|
PermissionType.seed do |s|
|
||||||
PermissionType.seed(id: 2, type: 'Sites')
|
s.id = 1
|
||||||
PermissionType.seed(id: 3, type: 'Cats')
|
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.
|
Then `rake db:seed_fu` if you're in Rails.
|
||||||
|
|
|
@ -2,7 +2,7 @@ Capistrano::Configuration.instance.load do
|
||||||
namespace :db do
|
namespace :db do
|
||||||
desc "Load seed data into Mongoid database"
|
desc "Load seed data into Mongoid database"
|
||||||
task :seed_fu do
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue