Seeds db with sample organization
This commit is contained in:
parent
bf219ec015
commit
2ee7851ac9
1 changed files with 6 additions and 0 deletions
|
|
@ -14,6 +14,12 @@ user.password = Devise.friendly_token[0, 20]
|
||||||
user.skip_confirmation!
|
user.skip_confirmation!
|
||||||
user.save!
|
user.save!
|
||||||
|
|
||||||
|
# Create sample organization
|
||||||
|
organization = Organization.find_or_initialize_by(name: 'OSEM',
|
||||||
|
description: 'Open Source Event Manager',
|
||||||
|
picture: 'osem-logo.png')
|
||||||
|
organization.save!
|
||||||
|
|
||||||
# Questions
|
# Questions
|
||||||
qtype_yesno = QuestionType.find_or_create_by!(title: 'Yes/No')
|
qtype_yesno = QuestionType.find_or_create_by!(title: 'Yes/No')
|
||||||
QuestionType.find_or_create_by!(title: 'Single Choice')
|
QuestionType.find_or_create_by!(title: 'Single Choice')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue