rails_bootstrap_error_renderer 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d604e42b44d4966d9d379f333af11af8211be11c95d4e06a9f00b1fddfe67219
4
- data.tar.gz: c1bd0fccbbcbb7c29c416a79921db387465fb43d9ae0b684d8af0ec4ac9a339d
3
+ metadata.gz: 8c44e060114bada7ec579e78ce4327ff15b7085c44a6942f76c672015d14af1c
4
+ data.tar.gz: 31e5cb7550c6698dec8556e8623463ab776fccef4c3b5b3911c503eb64acf6f9
5
5
  SHA512:
6
- metadata.gz: 705e087860daff483d57592d143a4a4b767f729f8a35e3ff3e1637afea8612d22f9c892985592adf0f7c189ec259e81d83e91847d8c1ce535601322be55fc311
7
- data.tar.gz: 027e3e61219d42c8e3809f7186c9941deedb8d58cdf8ef08a5927c82e0bbba93be5a3c2ff3dae87993d3dc49ca696c71ca063713aeb1f41e2834daed8d7983a5
6
+ metadata.gz: d0c07b2ad4e1c0b2dee2c450820e8402854f87ea264abac2ac13a99b232f857e13a0414a819a945f13698f4d6364f3f5e6d2f63c2d87167e88514e7516020a95
7
+ data.tar.gz: b741d014d6bb08a134354137fbee4c6825ddfb316868085fa609542532c24ecbb9bdfb3eab5657b1a22465bffac5e35c197c05cfefe0c4f32fa505db61db85e6
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsBootstrapErrorRenderer
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -20,8 +20,9 @@ module RailsBootstrapErrorRenderer
20
20
  def self.render_for_element(element, instance)
21
21
  element.add_class("is-invalid")
22
22
  if applicable_input? element
23
+ msgs = Array.wrap(instance.error_message).map { |m| %(<div class="invalid-feedback">#{m}</div>) }.join("\n")
23
24
  instance.raw(
24
- %(#{element.to_html} <div class="invalid-feedback">#{[*instance.error_message].to_sentence}</div>)
25
+ %(#{element.to_html}\n#{msgs})
25
26
  )
26
27
  else
27
28
  instance.raw element.to_html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_bootstrap_error_renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Sterba
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-16 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri