Ilia Aptsiauri Ilia Aptsiauri - 1 year ago 83
Ruby Question

how can I render datalist tag with slim-lang

To render views in the Ruby on Rails application I am using slim-lang, in one of my views I would like to have the

tag, with pre-field options how this will be possible with slim-lang.


= datalist :languages, options_for_select(@languages)

Answer Source

Slim will simply convert whatever you pass to HTML, have you tried:

  - ["Internet Explorer", "Firefox"].each do |browser|
    option value=browser
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download