Add Booth type dropdown and update ability file.

This commit is contained in:
Rishabh Singh 2019-08-17 18:11:47 +05:30
parent 319b8b5bf7
commit 7dd9780c84
2 changed files with 20 additions and 1 deletions

View file

@ -73,6 +73,21 @@ module EventsHelper
active_dropdown(selection, options)
end
def booth_type_dropdown(booth, booth_types, conference_id)
selection = booth.booth_type.try(:title) || 'Booth Type'
options = booth_types.collect do |booth_type|
[
booth_type.title,
admin_conference_booth_path(
conference_id,
booth,
booth: { booth_type_id: booth_type.id }
)
]
end
active_dropdown(selection, options)
end
def track_dropdown(event, tracks, conference_id)
selection = event.track.try(:name) || 'Track'
options = tracks.collect do |track|