Sha256: c03d1388c7dca7c6e731d4343061314017c764b1e9787d479de4f23855ffa583
Contents?: true
Size: 974 Bytes
Versions: 8
Compression:
Stored size: 974 Bytes
Contents
<% association_name = association[:name] collection = MerbAdmin::AbstractModel.new(association[:child_model]).all.map{|o| [o.id, object_name(o)]}.sort_by{|o| o[1]} selected = @object.send(association_name) label = association[:pretty_name] %> <fieldset class="module aligned"> <h2><%= label %></h2> <div class="form-row"> <div> <%= select(:name => "associations[#{association_name}][]", :id => association_name, :collection => collection, :selected => selected.map{|o| o.id.to_s}, :label => label, :multiple => true) %> <script type="text/javascript">addEvent(window, "load", function(e) {SelectFilter.init("<%= association_name %>", "<%= association_name %>", 0, "<%= image_path %>"); });</script> <p class="help">Hold down "Control", or "Command" on a Mac, to select more than one.</p> </div> </div> </fieldset>
Version data entries
8 entries across 8 versions & 1 rubygems