Sha256: bdd3be288c0438caeec77d6b7652285a37d23ace7212700c411381b53dd78889
Contents?: true
Size: 750 Bytes
Versions: 5
Compression:
Stored size: 750 Bytes
Contents
<% options = [] @resource[:class].send(attribute).each do |option| case option.kind_of?(Array) when true selected = 'selected' if @item.send(attribute).eql?(option.last) options << %Q[<option #{selected} value="#{option.last}">#{option.first}</option>] else selected = 'selected' if @item.send(attribute).eql?(option) options << %Q[<option #{selected} value="#{option}">#{option}</option>] end end %> <li><label for="item_<%= attribute %>"><%= @resource[:class].human_attribute_name(attribute) %></label> <select id="item_<%= attribute %>" <%= 'disabled="disabled"' if attribute_disabled?(attribute) %> name="item[<%= attribute %>]"> <option value=""></option> <%= options.join("\n") %> </select></li>
Version data entries
5 entries across 5 versions & 1 rubygems