Allow submission of proposal only if program has cfp

This commit is contained in:
Aditya Prakash 2016-03-12 21:08:43 +05:30
parent 9e67a1bcd5
commit 3e32c58460
5 changed files with 32 additions and 11 deletions

View file

@ -31,7 +31,7 @@ FactoryGirl.define do
libero quis porta ultricies. Fusce pulvinar accumsan lobortis.
EOS
after(:build) do |event|
event.event_users << build(:submitter)
event.event_users << build(:submitter) unless event.submitter # so that we don't have two submitters
# set an event_type if none is passed to the factory.
# needs to be created here because otherwise it doesn't belong to the
# same conference as the event