Sha256: 1b0f4ef7fc4bbd6f2186a7dc48b605cda155f2f163cfb6e9bc3532fea2c56c23

Contents?: true

Size: 566 Bytes

Versions: 8

Compression:

Stored size: 566 Bytes

Contents

<% if resource.errors.any? %>
  <p class="errorExplanation" id="errorExplanation">
    <%= raw resource.errors.keys.collect{|k|
      title = if k.to_s.match(/\./)
        assoc_name, attr_name = k.to_s.split(".")
        klass = resource.lolita.dbi.reflect_on_association(assoc_name.to_sym).klass
        klass.human_attribute_name(attr_name).downcase
      else
        resource.class.human_attribute_name(k)
      end
      "#{title.to_s.capitalize}: #{resource.errors[k].join(" #{::I18n.t("lolita.shared.and")} ")}"
    }.compact.join("<br>") %>
  </p>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lolita-3.1.18 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.2.0.rc.6 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.2.0.rc.5 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.2.0.rc.4 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.2.0.rc.3 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.2.0.rc2 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.2.0.rc1 app/views/components/lolita/configuration/tab/_error_msg.html.erb
lolita-3.1.17 app/views/components/lolita/configuration/tab/_error_msg.html.erb