mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Use only new hash syntax
This commit is contained in:
parent
3901973fd6
commit
5289f41eb5
72 changed files with 179 additions and 181 deletions
22
db/seeds.rb
22
db/seeds.rb
|
|
@ -5,22 +5,22 @@
|
|||
#
|
||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
Role.create(:name => "Participant")
|
||||
Role.create(:name => "Organizer")
|
||||
Role.create(:name => "Admin")
|
||||
Role.create(name: "Participant")
|
||||
Role.create(name: "Organizer")
|
||||
Role.create(name: "Admin")
|
||||
|
||||
qtype_yesno = QuestionType.create(:title => "Yes/No")
|
||||
QuestionType.create(:title => "Single Choice")
|
||||
QuestionType.create(:title => "Multiple Choice")
|
||||
qtype_yesno = QuestionType.create(title: "Yes/No")
|
||||
QuestionType.create(title: "Single Choice")
|
||||
QuestionType.create(title: "Multiple Choice")
|
||||
|
||||
answer_yes = Answer.create(:title => "Yes")
|
||||
answer_no = Answer.create(:title => "No")
|
||||
answer_yes = Answer.create(title: "Yes")
|
||||
answer_no = Answer.create(title: "No")
|
||||
|
||||
questions_yes_no = ["Do you need handicapped access to the venue?", "Are you attending with partner?", "Will you attend the social event(s)?", "Will you stay at suggested hotel?"]
|
||||
|
||||
questions_yes_no.each do |i|
|
||||
q = Question.create(:title => i, :question_type_id => qtype_yesno.id, :global => true)
|
||||
q = Question.create(title: i, question_type_id: qtype_yesno.id, global: true)
|
||||
|
||||
Qanswer.create(:question_id => q.id, :answer_id => answer_no.id)
|
||||
Qanswer.create(:question_id => q.id, :answer_id => answer_yes.id)
|
||||
Qanswer.create(question_id: q.id, answer_id: answer_no.id)
|
||||
Qanswer.create(question_id: q.id, answer_id: answer_yes.id)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue