action_form 0.6.2 → 0.6.3

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: bbbe2e5ddd6107e0e195b8ec470410a924df9f447cfcde24b5a8b786d24492d4
4
- data.tar.gz: 73e76620c3cbc937366c27c99eca857eb804e4818d03b59131c4785ba93476cf
3
+ metadata.gz: 6058a47fdd210352236338e5c48f0d9a4e0bcea6ee9b1bceb5c7ea822501d1b6
4
+ data.tar.gz: b522f74f7f09e7c9db67ae0dec21784abaa2c8af3de84a7c91a943d36d38716e
5
5
  SHA512:
6
- metadata.gz: 64d7bba4f099f1b38c60dd6ece52aaa296d25a00a1a217f3528dda4054cd8b972559eb33b2355af9f995fe665722c95023cac0569979e9f0b65b20ad7c2c213c
7
- data.tar.gz: 8eb43563d718cacf468b656d0d188ed96fc950179b7a6375056edd2a026e3b8fe2a324f989aef4792e126f6d7d4b14847e125ad5184c3301b9afc2b255074e01
6
+ metadata.gz: 568fd282705780be64c8628043173420a332c66a3b830ed7419711c73abcccc3502446ae22a3bb82b492188193ce86a9ca8f45c77c518f635af37427d336fa6b
7
+ data.tar.gz: 465137a9ca7a5321fe871482ed252e7ec809349c4b3c19485c26a8128327f6aeb08ad9ffc778ffdc63638e1170bdc6b1f920c55abbff9447096099ccc38118b7
@@ -4,6 +4,8 @@ module ActionForm
4
4
  # Represents a form element with input/output configuration and HTML attributes
5
5
  # rubocop:disable Metrics/ClassLength
6
6
  class Element
7
+ PROTECTED_TAGS = %i[input output options errors].freeze
8
+
7
9
  include ActionForm::Composition
8
10
 
9
11
  attr_reader :name, :input_options, :output_options, :html_name, :html_id, :select_options, :tags, :errors_messages
@@ -63,8 +65,9 @@ module ActionForm
63
65
  @label_options = [{ text: text, display: display }, html_options]
64
66
  end
65
67
 
66
- def tags(**tags_list)
67
- tags_list.merge!(tags_list)
68
+ def tags(**extra_tags)
69
+ filtered_tags = extra_tags.delete_if { |key, _| PROTECTED_TAGS.include?(key) }
70
+ tags_list.merge!(filtered_tags)
68
71
  end
69
72
  end
70
73
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionForm
4
- VERSION = "0.6.2"
4
+ VERSION = "0.6.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrii Baran