render_turbo_stream 4.3.11 → 4.3.13

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: 1632f986315bf12186e902f24959cd243b541ba1cf6055e88d53ea2019564855
4
- data.tar.gz: 398cbcba033712aab8d7bf1022b40c5c47cb55820026e11387db4aa5d53c137f
3
+ metadata.gz: 74c586fc8f14f7f8c158b25c3cb0d548e9ebbacc77a3e6327beae1aff722bf4a
4
+ data.tar.gz: dfba23e8a945c98873e6d27c377382a6bddaf4948b97990471908a379a986871
5
5
  SHA512:
6
- metadata.gz: b2d46b22f8505bc1c6a5b7cd1c388e848dc90a7353e6cf86cfdb3c9a776bedd85be3f01cc25349b99b784d3aadbb682a8f23dc70d0a8a861db02131a6b1950d3
7
- data.tar.gz: 73bec9e074afbf69bcd3765fd8100cb6721897bd70dd2d9488f079bf0daf39f2c54feb7f8cc881bbd45b4eddb7678d86cce767bfab583c53a92b97bc41ee3ae1
6
+ metadata.gz: 70d324640d87e5c29887b3bf0e19a0a0a5e5c72081983a827a9cfcb2f86943c48d42f0ff10f6b1e9010cbdca5e29067d82c61ce45c41300bdd6bdf09fafaf39d
7
+ data.tar.gz: 937778d9f95feff150b9af5b1a3581cc73fbc2613e33a187046a11c85363e6bf166cc6ab1f6237307f6cc0ef3256d318cdb595492729afbbade9e5742c456db1
data/README.md CHANGED
@@ -135,6 +135,15 @@ render_turbo_stream(
135
135
  )
136
136
  ```
137
137
 
138
+ for just rendering a partial there is a helper:
139
+
140
+ ```ruby
141
+ stream_partial(
142
+ 'form',
143
+ locals: {}
144
+ )
145
+ ```
146
+
138
147
  this enables:
139
148
 
140
149
  - turbo-stream or custom javascript actions from turbo and all actions from [turbo_power](https://github.com/marcoroth/turbo_power)
@@ -242,7 +251,7 @@ In order to avoid this kind of tedious coding, the gem has a kind of fallback bu
242
251
 
243
252
  **Debugging**
244
253
 
245
- If a save action fails, `turbo_stream_save` and `turbo_channel_save` are logging the output from `Model.errors.full_messages` to the console, at log-level `:debug`.
254
+ On `:debug` level ([rails-docs](https://guides.rubyonrails.org/v3.2.14/debugging_rails_applications.html#log-levels)), if a save action fails, `turbo_stream_save` and `turbo_channel_save` are logging the output from `Model.errors.full_messages` to the console.
246
255
 
247
256
  # Request Testing
248
257
 
@@ -171,5 +171,10 @@ module RenderTurboStream
171
171
 
172
172
  end
173
173
 
174
+
175
+ def stream_partial(partial, id: nil, action: :replace, locals: {})
176
+ render_turbo_stream([{partial: partial, locals: locals, id: id, action: action}])
177
+ end
178
+
174
179
  end
175
180
  end
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "4.3.11"
2
+ VERSION = "4.3.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_turbo_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.11
4
+ version: 4.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-10 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails