Hyper master data manager for activerecord.
- Put
db/Seedfile
on your application.
# vi: set ft=ruby :
transaction do
model User do
record id: 1 do
name 'user 1'
end
record id: 2 do
name 'user 2'
end
end
model Profile do
record user_id: 1 do
biography 'bio 1'
end
end
model Article do
record id: 1, user_id: 1 do
title 'welcome!'
body 'this is first article!'
end
end
end
- Run
bundle exec rails db:seed
orbundle exec rails db:seed:dry-run
Add this line to your application's Gemfile:
gem 'seedog'
And then execute:
$ bundle
Or install it yourself as:
$ gem install seedog
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.