Sha256: 8b483403d88119bf4a07e564da555c8a4e116116b8355e5015d30c5d13c8d35c
Contents?: true
Size: 904 Bytes
Versions: 5
Compression:
Stored size: 904 Bytes
Contents
<% name = association[:name] collection = MerbAdmin::AbstractModel.new(association[:child_model]).all.map{|o| [o.id, object_title(o)]}.sort_by{|o| o[1]} selected = @object.send(name) label = association[:pretty_name] %> <fieldset class="module aligned"> <h2><%= label %></h2> <div class="form-row"> <div> <%= select(:name => "associations[#{name}][]", :id => 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("<%= name %>", "<%= 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
5 entries across 5 versions & 2 rubygems