shoelace-rails 0.6.0 → 0.6.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: 206ca8361dedd910c96e3c13469e9bad996af7d2a91a0ca0af2cb8e1a7430808
4
- data.tar.gz: 64df314d89557bd02dbf791bddcc49185017f5cb1d22c5046a23f1767df5bf18
3
+ metadata.gz: 220b7683429f052cb711bac68076e05f812a19c7857864e66bc3863ca5740b78
4
+ data.tar.gz: 3947f8255bdb9a41d7faee272b77e356a78a233719b8e2b1d15e4bc814668fe1
5
5
  SHA512:
6
- metadata.gz: 284ca5c08643f593de6554d02bb8e4857d141c8a4ddc02def92e573a273a3b45694e2ce14783779fbafe83eea1b9cbc85fd80ba52f36dc235e11d5cec6e9f6b1
7
- data.tar.gz: 22ca68a850b08eebb0ad6d8fd48a8a7b65a3a4647acd34171f04cac20eca635475147804194957efe75fb4aeef68741b4b65fc3f10edc214165b3eb51addefcb
6
+ metadata.gz: '039b7be7a76bd89494cc7a95fab19d702c2ec87fc49f35dd6d19a88c7cc2ef0ebc1867d499a0e71b59044421d0199efed9b42417b1d8f38d3513157d5eebaf94'
7
+ data.tar.gz: fc32460b9adadafdf3bc35be7bf8c360a2e9dd5d2645edad50f9f7efeb420275ce2be57df4f3653b88efaf3254686a158b06b512d2201079cae661fade8c0419
data/CHANGELOG.md CHANGED
@@ -1,8 +1,16 @@
1
- ## v0.6.0
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Shoelace
4
4
  module Rails
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
6
6
  end
7
7
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoelace-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Nishijima