Sha256: e5fa5c81e18850258e6c831a20519ef4bdf0acc6545cd2948f32fbcb36ec041d

Contents?: true

Size: 663 Bytes

Versions: 1

Compression:

Stored size: 663 Bytes

Contents

<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
<%= f.collection_select "#{a.to_s.singularize}_ids",
class_name_from_association(f.object, a).classify.constantize.all.limit(20), :id,
object_label(class_name_from_association(f.object, a)),
{include_blank: true},
{
  class: 'selectize-model-multiple',
  multiple: 'multiple',
  '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-0.1.0 app/views/slash_admin/fields/_has_many.html.erb