Hyper master data manager for activerecord.
- Put
db/Seedfileon 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:seedorbundle exec rails db:seed:dry-run
Add this line to your application's Gemfile:
gem 'seedog'And then execute:
$ bundleOr install it yourself as:
$ gem install seedogContribution directions go here.
The gem is available as open source under the terms of the MIT License.