pxs-forms 0.1.3 → 0.1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9c05787b85813a1a754f426f21bbc85177f53e19d7a5c52e9197d8ce1b07fbb
4
- data.tar.gz: 6a786ceebe5b82975834900ddc6f8cee270a5dea06bd0b5d3aac595af4aa3938
3
+ metadata.gz: 1f7a314d815c775cdeed9694d61cb692e0b94e60bb214e42ac018f1a1d35ef13
4
+ data.tar.gz: e3923496a35748ca811cba372116f5fff5283adefa7b38d497aa3d73907b2625
5
5
  SHA512:
6
- metadata.gz: 70867890491a94036e8b27d1079eb56763e5151537015e8cd4e6ee7e8d44eee8cfb90824e571c18ddc7e97e1118347feed8bb48ab04157fcdfcbf2653e7f10d4
7
- data.tar.gz: ec788f41cb77b2586d4d8e90f3173234aa7133c449b3ff7bd9b0335a6bbd1cbb4285304552b6e1aa334481780d0584abfa5c372cc95417026ea99065f13ba430
6
+ metadata.gz: d0299fe66b2dde4952c1afc622b4effb1bb37257d3085c825f1aa8b394e6ea1f7f9429fae2453c27c670f56dbf307c41d06ecb4ea80d7a4e086225305ca74d1c
7
+ data.tar.gz: e6abeed8a07e0ab7a657ca05bbd1a1824a0822cb552aa33d1255bf86315f78d87ebb1826bdadaa3104cb059966ea376b8028fbd8dcdfda31b95d8c311ba756f2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unofficial Release
4
4
 
5
+ ## [0.1.4] - 2025-04-01
6
+
7
+ - Change error file
8
+ - Add configuration file
9
+
5
10
  ## [0.1.3] - 2025-03-19
6
11
 
7
12
  - Fix values not being automatically set for string, text, boolean fields
@@ -344,7 +344,13 @@ class ModelFormBuilder < ActionView::Helpers::FormBuilder
344
344
 
345
345
  def error_text(attribute)
346
346
  if has_error? attribute
347
- tag.div @object.errors[method].join("<br />").html_safe, class: "form-errors"
347
+ tag.div class: "field__errors" do
348
+ tag.ul do
349
+ safe_join @object.errors[attribute.to_sym].map { |message|
350
+ tag.li ("#{attribute.to_s.humanize}")
351
+ }
352
+ end
353
+ end
348
354
  end
349
355
  end
350
356
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pxs
4
4
  module Forms
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4.1"
6
6
  end
7
7
  end
data/lib/pxs/forms.rb CHANGED
@@ -4,3 +4,18 @@ require_relative "forms/version"
4
4
  require_relative "forms/links_helper"
5
5
  require_relative "forms/models_helper"
6
6
  require_relative "forms/model_form_builder"
7
+ require_relative "forms/configuration"
8
+
9
+ module Pxs
10
+ module Forms
11
+ class << self
12
+ attr_accessor :configuration
13
+
14
+ # Expose the configuration
15
+ def configure
16
+ self.configuration ||= Configuration.new
17
+ yield configuration if block_given?
18
+ end
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxs-forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Poubelle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-19 00:00:00.000000000 Z
11
+ date: 2025-04-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: