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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b686cf1705fa8c1c2ccf34f7cbe82d9b93998602a4527c8d81bd44eba91cd791
|
4
|
+
data.tar.gz: 7bd8087ee664a3a715eb36271627eb276b11313adef4a9c2264ef6188163b311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcfee3b15c406fc151f3dd1389d7b835bd4b389e845330e8510af6cbf97703c6aff7a05f502d8b272a1e854eb19b0ab88148cb3460e45fb6463726e5ff5df116
|
7
|
+
data.tar.gz: ecfa85b721552da7e3fb6564a2b74c5673107c459bcfeb578974cbba07daf9c55d84be601d01c3255264c18876a72149dc81eac414af14a46129c7259f1bf205
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.1
|
data/CHANGELOG.md
CHANGED
@@ -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]
|
@@ -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.
|
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:
|
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.
|
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.
|