Sha256: d5f4261b1c0bee1ba14000476790be4be58f3204c572345b926a3e81e1e886de

Contents?: true

Size: 1.13 KB

Versions: 10

Compression:

Stored size: 1.13 KB

Contents

<%
  # headmin/forms/association
  #
  # ==== Required parameters
  # * +attribute+ - Name of the association
  # * +form+ - Form object
  #
  # ==== Optional parameters
  # * +collection+ - Values to create option tags for
  #
  #
  # ==== Examples
  #   Basic version
  #   <%= form_with do |form| %#>
  #     <%= render "headmin/forms/association", form: form, attribute: :product %#>
  #   <% end %#>

  association = Headmin::Form::AssociationView.new(local_assigns)

%>

<%= render "headmin/forms/wrapper", association.wrapper_options do %>
  <%= render "headmin/forms/label", association.label_options if association.prepend_label? %>
  <%= render "headmin/forms/input_group", association.input_group_options do %>
    <%= form.select(association.attribute_with_id, association.collection, association.select_options, association.input_options) %>
  <% end %>
  <%= render "headmin/forms/validation", association.validation_options if association.validate? %>
  <%= render "headmin/forms/hint", association.hint_options if association.hint? %>
  <%= render "headmin/forms/label", association.label_options if association.append_label? %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
headmin-0.6.3 app/views/headmin/forms/_association.html.erb
headmin-0.6.2 app/views/headmin/forms/_association.html.erb
headmin-0.6.1 app/views/headmin/forms/_association.html.erb
headmin-0.6.0 app/views/headmin/forms/_association.html.erb
headmin-0.5.9 app/views/headmin/forms/_association.html.erb
headmin-0.5.8 app/views/headmin/forms/_association.html.erb
headmin-0.5.7 app/views/headmin/forms/_association.html.erb
headmin-0.5.6 app/views/headmin/forms/_association.html.erb
headmin-0.5.5 app/views/headmin/forms/_association.html.erb
headmin-0.5.4 app/views/headmin/forms/_association.html.erb