render_turbo_stream 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1299653f6a308796e690ca3929cd4c1580f707604913583e223a4bf4d398f889
4
- data.tar.gz: d6228eb9aeb0e64591b1a066d1007ab665ab634788f8645ad7124063c9ef2c0e
3
+ metadata.gz: 9a070060e95c95882e3bb687a37859fca7a46d6e4557695b5b1779fc2a37f9d9
4
+ data.tar.gz: cb01fb80b57bbc96d7418fed0164fff2ac72515ed13a1281672ea9a793e0ba00
5
5
  SHA512:
6
- metadata.gz: d660266f923b6e6efa8225162b9eab8f0eb56eb0ed9f289601106bc661abd74f2dd6832021133c5b9031314475c657c27a1d34388e2c063fbb84a65cb4680b40
7
- data.tar.gz: c511dfd6b6799a9075ab594aa60d806c428cf63abfb42cc6f4cbcdcd718197e67f840e89a799a789375f21dd10bd4c78e7fe3c7e933dd132637a900ff2477909
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
- it 'update failed' do
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].symbolize_keys, formats: [:html]) %>
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].symbolize_keys %>
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].symbolize_keys %>
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].symbolize_keys %>
34
+ <%= render s[:partial], locals: s[:locals]&.symbolize_keys %>
35
35
  <% end %>
36
36
 
37
37
  <% else %>
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_turbo_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian