more extensive database seeds (in two languages) (closes foodcoops#277)

This commit is contained in:
wvengen 2014-04-08 13:11:06 +02:00
parent 8e04074cd3
commit 0e1cde9e2b
7 changed files with 444 additions and 27 deletions

View file

@ -1,27 +1,4 @@
# Create nessecary data to start with a fresh installation
# default seed is minimal
require Rails.root.join('db/seeds/minimal.seeds.rb')
# Create working group with full rights
administrators = Workgroup.create(
:name => "Administrators",
:description => "System administrators.",
:role_admin => true,
:role_finance => true,
:role_article_meta => true,
:role_suppliers => true,
:role_orders => true
)
# Create admin user
admin = User.create(
:nick => "admin",
:first_name => "Anton",
:last_name => "Administrator",
:email => "admin@foo.test",
:password => "secret"
)
# Admin joins the admin group
Membership.create(:group => administrators, :user => admin)
# First entry for article categories
ArticleCategory.create(:name => "Other", :description => "The other stuff fits here..")
# to generate new seeds, use the seed_dumper gem