simple_form_localized_input 1.0.11 → 1.0.12

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: dc0bd45d513f9a0a72773d7d696ca59b5dca2223752c569592bbb3e725fa999f
4
- data.tar.gz: 469dd92a5bbf2adefd299d0e5799b28b5af529b27b603365dc1e2cabd41de7cb
3
+ metadata.gz: b686cf1705fa8c1c2ccf34f7cbe82d9b93998602a4527c8d81bd44eba91cd791
4
+ data.tar.gz: 7bd8087ee664a3a715eb36271627eb276b11313adef4a9c2264ef6188163b311
5
5
  SHA512:
6
- metadata.gz: f84bc0466c0a6fea902b1d8ade66ef598d75c2f1eedb3d5df00ff53cf6df4c42c399e83f887d27dafe16af6916498e5e53f0aa7468e74926fc1e77994818acd6
7
- data.tar.gz: 73ce80d4179bfdebd05699e4516afc5da7029d0d523a7be832ba5ac2577065f7098ca97ed1f3d04df2c20e626bba049135155595f6f00f970d5ab31ff255648c
6
+ metadata.gz: fcfee3b15c406fc151f3dd1389d7b835bd4b389e845330e8510af6cbf97703c6aff7a05f502d8b272a1e854eb19b0ab88148cb3460e45fb6463726e5ff5df116
7
+ data.tar.gz: ecfa85b721552da7e3fb6564a2b74c5673107c459bcfeb578974cbba07daf9c55d84be601d01c3255264c18876a72149dc81eac414af14a46129c7259f1bf205
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.12
4
+
5
+ * Add `localized` class to wrapper
6
+
3
7
  ## 1.0.11
4
8
 
5
9
  * Mongoid 8 compatibility
@@ -10,6 +10,9 @@ module SimpleFormLocalizedInput
10
10
  field_name = [attribute_name, 'translations'].join('_')
11
11
  field_value = OpenStruct.new(object.send(field_name))
12
12
 
13
+ options[:wrapper_html] ||= {}
14
+ options[:wrapper_html][:class] = [options[:wrapper_html][:class], "localized"].compact.join(" ").strip
15
+
13
16
  simple_fields_for(field_name, field_value) do |fields|
14
17
  ::I18n.available_locales.collect do |loc|
15
18
  collection = options[:collection_translations] ? options[:collection_translations][loc.to_s] : options[:collection]
@@ -1,3 +1,3 @@
1
1
  module SimpleFormLocalizedInput
2
- VERSION = '1.0.11'.freeze
2
+ VERSION = '1.0.12'.freeze
3
3
  end
@@ -7,7 +7,7 @@ describe SimpleFormLocalizedInput::FormBuilder do
7
7
  end
8
8
  }
9
9
 
10
- it { form.must_include "<div class=\"input string optional user_title_translations_en\"><label class=\"string optional\" for=\"user_title_translations_en\">Title (en)</label><input class=\"string optional\" type=\"text\" name=\"user[title_translations][en]\" id=\"user_title_translations_en\" /></div>" }
10
+ it { form.must_include "<div class=\"input string optional user_title_translations_en localized\"><label class=\"string optional\" for=\"user_title_translations_en\">Title (en)</label><input class=\"string optional\" type=\"text\" name=\"user[title_translations][en]\" id=\"user_title_translations_en\" /></div>" }
11
11
 
12
- it { form.must_include "<div class=\"input string optional user_title_translations_cs\"><label class=\"string optional\" for=\"user_title_translations_cs\">Title (cs)</label><input class=\"string optional\" type=\"text\" name=\"user[title_translations][cs]\" id=\"user_title_translations_cs\" /></div>" }
12
+ it { form.must_include "<div class=\"input string optional user_title_translations_cs localized\"><label class=\"string optional\" for=\"user_title_translations_cs\">Title (cs)</label><input class=\"string optional\" type=\"text\" name=\"user[title_translations][cs]\" id=\"user_title_translations_cs\" /></div>" }
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_localized_input
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-21 00:00:00.000000000 Z
11
+ date: 2025-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_form
@@ -118,6 +118,7 @@ extra_rdoc_files: []
118
118
  files:
119
119
  - ".github/workflows/test.yml"
120
120
  - ".gitignore"
121
+ - ".ruby-version"
121
122
  - Appraisals
122
123
  - CHANGELOG.md
123
124
  - Gemfile
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
156
  - !ruby/object:Gem::Version
156
157
  version: '0'
157
158
  requirements: []
158
- rubygems_version: 3.3.14
159
+ rubygems_version: 3.5.6
159
160
  signing_key:
160
161
  specification_version: 4
161
162
  summary: Custom input for Simple Form that renders Mongoid fields for multiple locales.