Sha256: 57ddc26b55f3a13d21f3c1d6fb9792eb75f78562b1fc8f935eba91bed33c9800

Contents?: true

Size: 737 Bytes

Versions: 7

Compression:

Stored size: 737 Bytes

Contents

.autocomplete-container
  - if field.association.macro == :one
    = self.current_form.hidden_field field.association.key
    = render_component *field.build(:state => "input", :with_value => true)
  - else
    - 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.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

7 entries across 7 versions & 1 rubygems

Version Path
lolita-3.2.0.rc.16 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml
lolita-3.2.0.rc.14 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml
lolita-3.2.0.rc.13 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml
lolita-3.2.0.rc.12 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml
lolita-3.2.0.rc.11 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml
lolita-3.2.0.rc.10 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml
lolita-3.2.0.rc.9 app/views/components/lolita/configuration/field/array/autocomplete/_display.html.haml