render_turbo_stream 1.2.0 → 1.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a070060e95c95882e3bb687a37859fca7a46d6e4557695b5b1779fc2a37f9d9
|
4
|
+
data.tar.gz: cb01fb80b57bbc96d7418fed0164fff2ac72515ed13a1281672ea9a793e0ba00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ba050699fcda283665e128c364182ea115c5ba9d18090f2e17082597e182589f91a5a2165e6368fa5e4c6fc0a451d46fa869e3632cae50c9f91fb738a5eb3da
|
7
|
+
data.tar.gz: 33cdee02b396b110582ff6804e35702fb8d324148694f3c1b1246688a1ae757296167a22557b7b95703881de7cf0e7aa72ed812a989bc770684c0d58b03d9a85
|
data/README.md
CHANGED
@@ -110,7 +110,7 @@ If you want to check if a controller action succeeded, just check for `response.
|
|
110
110
|
For rspec there is a special helper, for a successful save action:
|
111
111
|
|
112
112
|
```ruby
|
113
|
-
|
113
|
+
it 'update failed' do
|
114
114
|
patch article_path(article, params: valid_params)
|
115
115
|
expect_successful_saved('form', 'flash-box')
|
116
116
|
# expects response.status 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<% streams.each do |s| %>
|
4
4
|
|
5
|
-
<% html = (render s[:partial], locals: s[:locals]
|
5
|
+
<% html = (render s[:partial], locals: s[:locals]&.symbolize_keys, formats: [:html]) %>
|
6
6
|
|
7
7
|
<% rendered_partials.push({ html_response: html }.merge(s)) %>
|
8
8
|
|
@@ -17,21 +17,21 @@
|
|
17
17
|
<% ctl[:action] = :replace %>
|
18
18
|
<% Rails.logger.debug(" • render-turbo-stream REPLACE => #{info}") %>
|
19
19
|
<%= turbo_stream.replace s[:id] do %>
|
20
|
-
<%= render s[:partial], locals: s[:locals]
|
20
|
+
<%= render s[:partial], locals: s[:locals]&.symbolize_keys %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<% elsif s[:action].to_sym == :prepend %>
|
24
24
|
<% ctl[:action] = :prepend %>
|
25
25
|
<% Rails.logger.debug(" • render-turbo-stream PREPEND => #{info}") %>
|
26
26
|
<%= turbo_stream.prepend s[:id] do %>
|
27
|
-
<%= render s[:partial], locals: s[:locals]
|
27
|
+
<%= render s[:partial], locals: s[:locals]&.symbolize_keys %>
|
28
28
|
<% end %>
|
29
29
|
|
30
30
|
<% elsif s[:action].to_sym == :append %>
|
31
31
|
<% ctl[:action] = :append %>
|
32
32
|
<% Rails.logger.debug(" • render-turbo-stream APPEND => #{info}") %>
|
33
33
|
<%= turbo_stream.prepend s[:id] do %>
|
34
|
-
<%= render s[:partial], locals: s[:locals]
|
34
|
+
<%= render s[:partial], locals: s[:locals]&.symbolize_keys %>
|
35
35
|
<% end %>
|
36
36
|
|
37
37
|
<% else %>
|