Method: CCS::Components::GovUK::Field::Input::Select#render
- Defined in:
- lib/ccs/components/govuk/field/input/select.rb
#render ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK Select component
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ccs/components/govuk/field/input/select.rb', line 52 def render super do if [:form] [:form].select( attribute, items, {}, **[:attributes] ) else context.select_tag( attribute, context.( items, selected ), **[:attributes] ) end end end |