mirror of
https://github.com/openSUSE/osem.git
synced 2026-01-25 06:21:29 -05:00
11 lines
388 B
Plaintext
11 lines
388 B
Plaintext
:ruby
|
|
include_blank ||= false
|
|
select_id = field_id(f.object_name, local_assigns[:for])
|
|
value = f.object.send(local_assigns[:for])
|
|
|
|
- options.each_with_index do |option, i|
|
|
- selected = value.present? ? option.id == value : !include_blank && i == 0
|
|
|
|
%span.help-block.select-help-text.collapse{ id: "#{option.id}-help", class: [select_id, ('in' if selected)] }
|
|
= yield option
|