Sha256: 7a38b287da33f02732af142a41078628ad72e9bb62ebf6829111b1fa753028e7
Contents?: true
Size: 827 Bytes
Versions: 1
Compression:
Stored size: 827 Bytes
Contents
<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %> <%= render 'slash_admin/shared/tooltip', a: a %> <%= f.collection_select "#{a.to_s.singularize}_ids", class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id IN(#{f.object.send(a).pluck(:id).join(',')}) THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(class_name_from_association(f.object, a)), {include_blank: true}, { class: 'selectize-model-multiple', multiple: true, 'data-model': class_name_from_association(f.object, a).constantize.model_name.to_s.underscore, 'data-fields': "SlashAdmin::Models::#{class_name_from_association(f.object, a).classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '), required: required?(f.object, a) } %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slash_admin-1.0.6 | app/views/slash_admin/fields/_has_many.html.erb |