Sha256: e84193e7393fdeaf936044a3e50307f9300ce4d59a42093c0f41ff90727a1db6
Contents?: true
Size: 1000 Bytes
Versions: 17
Compression:
Stored size: 1000 Bytes
Contents
<% association_name = association[:name] collection = MerbAdmin::AbstractModel.new(association[:child_model]).all.map{|object| [object.id, object_label(object)]}.sort_by{|object| object[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
17 entries across 17 versions & 1 rubygems