Questions: fixes, redesign form, fix edit error
This commit is contained in:
parent
38bc2e3c3a
commit
e25425bd77
20 changed files with 300 additions and 117 deletions
|
|
@ -2,11 +2,27 @@
|
|||
|
||||
FactoryGirl.define do
|
||||
factory :question do
|
||||
title 'blah'
|
||||
title 'Do you?'
|
||||
question_type
|
||||
after(:build) do |question|
|
||||
question.answers << build(:answer)
|
||||
question.conferences << build(:conference)
|
||||
|
||||
factory :question_with_answers do
|
||||
title 'Which do you choose?'
|
||||
|
||||
after(:build) do |question|
|
||||
question.answers << build(:answer1)
|
||||
question.answers << build(:answer2)
|
||||
end
|
||||
end
|
||||
|
||||
factory :attending_with_partner do
|
||||
title 'Will you attend with a partner?'
|
||||
association :question_type, factory: :yes_no
|
||||
global true
|
||||
|
||||
after(:build) do |question|
|
||||
question.answers << build(:answer_yes)
|
||||
question.answers << build(:answer_no)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue