Revert "do not allow creation of proposal with keynote type"
This reverts commit e103ea18b5e4fb0ddb82aaf9c058325d7e3daced.
This commit is contained in:
parent
2a45f49a05
commit
0768514d89
1 changed files with 0 additions and 10 deletions
|
|
@ -39,16 +39,6 @@ class ProposalController < ApplicationController
|
|||
@event.event_users.new(user: current_user,
|
||||
event_role: 'speaker')
|
||||
|
||||
type_id = params[:event][:event_type_id].to_f
|
||||
keynote_ids = EventType.where(title: 'Keynote').pluck(:id)
|
||||
|
||||
if keynote_ids.include? type_id
|
||||
@event.errors.add(:event_type_id, 'You are not allowed to create a Keynote!')
|
||||
flash[:error] = "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
render action: 'new'
|
||||
return
|
||||
end
|
||||
|
||||
if !@event.save
|
||||
flash[:error] = "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
render action: 'new'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue