Sha256: 34a7bfbf15d4cbe58a4e3c06c8cf0ff5ea99cac3a2134f1dca30f079c7390073

Contents?: true

Size: 768 Bytes

Versions: 2

Compression:

Stored size: 768 Bytes

Contents

.autocomplete-container.zzz

  - if field.association.macro == :one
    = self.current_form.hidden_field field.association.key
    = render_component *field.build(:state => "input", :with_value => true)
  - else
         zzz
    - ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids"
    = hidden_field_tag "#{resource_name}[#{ids_method}][]",""
    = render_component *field.build(:state => "input")
    %ul
      - resource && resource.persisted? && resource.send(field.name).each do |record|
        %li
          = record.send(field.current_text_method(field.association.klass))
          = link_to I18n.t("lolita.shared.delete").downcase, nil
           = hidden_field_tag "#{resource_name}[#{ids_method}][]", record.id

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lolita-3.3.7 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml~
lolita-3.3.5 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml~