Sha256: a2e17fe2698a8c33d298341b3e97f0c51383313efab25d37af435e3eff6a25d8
Contents?: true
Size: 906 Bytes
Versions: 1
Compression:
Stored size: 906 Bytes
Contents
<%= f.label a, class: "form-control-label #{required?(f.object, a).present? ? 'required' : ''}" %> <%= render 'slash_admin/shared/tooltip', a: a %> <%= f.collection_select a.to_s + '_id', class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(class_name_from_association(f.object, a)), { prompt: t('slash_admin.view.select_model', model_name: class_name_from_association(f.object, a).constantize.model_name.human.downcase), }, '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(' '), class: 'selectize-model-single', required: required?(f.object, a).present? %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slash_admin-1.0.6 | app/views/slash_admin/fields/_belongs_to.html.erb |