shoelace-rails 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -2
- data/app/helpers/shoelace/form_helper.rb +1 -1
- data/lib/shoelace/rails/version.rb +1 -1
- data/test/helpers/translation_test.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 220b7683429f052cb711bac68076e05f812a19c7857864e66bc3863ca5740b78
|
4
|
+
data.tar.gz: 3947f8255bdb9a41d7faee272b77e356a78a233719b8e2b1d15e4bc814668fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '039b7be7a76bd89494cc7a95fab19d702c2ec87fc49f35dd6d19a88c7cc2ef0ebc1867d499a0e71b59044421d0199efed9b42417b1d8f38d3513157d5eebaf94'
|
7
|
+
data.tar.gz: fc32460b9adadafdf3bc35be7bf8c360a2e9dd5d2645edad50f9f7efeb420275ce2be57df4f3653b88efaf3254686a158b06b512d2201079cae661fade8c0419
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
-
## v0.6.
|
1
|
+
## v0.6.1
|
2
|
+
|
3
|
+
#### 🐞Bug Fixes
|
4
|
+
|
5
|
+
- Fixes a bug where form builders fail to render wtih a string `:as` option
|
6
|
+
|
7
|
+
## [v0.6.0](https://github.com/yuki24/shoelace-rails/tree/v0.6.0)
|
8
|
+
|
9
|
+
_<sup>released at 2024-03-13 02:54:02 UTC</sup>_
|
2
10
|
|
3
11
|
#### ⭐️ Features
|
4
12
|
|
5
|
-
- Add the ability to use translations with form helpers
|
13
|
+
- Add the ability to use translations with form helpers ([<tt>626f271</tt>](https://github.com/yuki24/shoelace-rails/commit/626f271ca710dd48040907ff6a99e3bba6c5d57c))
|
6
14
|
|
7
15
|
## [v0.5.0](https://github.com/yuki24/shoelace-rails/tree/v0.5.0)
|
8
16
|
|
@@ -270,7 +270,7 @@ module Shoelace
|
|
270
270
|
private
|
271
271
|
|
272
272
|
def label_text(method, tag_value = nil)
|
273
|
-
::ActionView::Helpers::Tags::Label::LabelBuilder.new(@template, object_name, method, object, tag_value).translation
|
273
|
+
::ActionView::Helpers::Tags::Label::LabelBuilder.new(@template, object_name.to_s, method, object, tag_value).translation
|
274
274
|
end
|
275
275
|
end
|
276
276
|
|
@@ -34,6 +34,14 @@ class TranslationTest < ActionView::TestCase
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
test "Form helpers should cast symbol object names to String" do
|
38
|
+
sl_form_for(User.new, as: :user, url: "/") do |form|
|
39
|
+
assert_dom_equal <<~HTML, form.text_field(:name)
|
40
|
+
<sl-input label="Full Name" type="text" name="user[name]" id="user_name"></sl-input>
|
41
|
+
HTML
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
37
45
|
test "#color_field should respect label translations" do
|
38
46
|
sl_form_for(User.new, url: "/") do |form|
|
39
47
|
assert_dom_equal <<~HTML, form.color_field(:name)
|