render_turbo_stream 4.3.10 → 4.3.11
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: 1632f986315bf12186e902f24959cd243b541ba1cf6055e88d53ea2019564855
|
4
|
+
data.tar.gz: 398cbcba033712aab8d7bf1022b40c5c47cb55820026e11387db4aa5d53c137f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2d46b22f8505bc1c6a5b7cd1c388e848dc90a7353e6cf86cfdb3c9a776bedd85be3f01cc25349b99b784d3aadbb682a8f23dc70d0a8a861db02131a6b1950d3
|
7
|
+
data.tar.gz: 73bec9e074afbf69bcd3765fd8100cb6721897bd70dd2d9488f079bf0daf39f2c54feb7f8cc881bbd45b4eddb7678d86cce767bfab583c53a92b97bc41ee3ae1
|
data/README.md
CHANGED
@@ -240,6 +240,10 @@ In order to avoid this kind of tedious coding, the gem has a kind of fallback bu
|
|
240
240
|
3. If all that not is found it raises a exception
|
241
241
|
4. wraps the partial within the `turbo_stream.*` and sends this to the front.
|
242
242
|
|
243
|
+
**Debugging**
|
244
|
+
|
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`.
|
246
|
+
|
243
247
|
# Request Testing
|
244
248
|
|
245
249
|
To test if the whole system works together, including javascript actions, so that finally a part reaches the surface, there is **Capybara** system testing. But it is a good practice to **break tests into smaller pieces**. So, there are helpers for **enabling the much faster request tests that are much easier to maintain**.
|
@@ -183,6 +183,10 @@ module RenderTurboStream
|
|
183
183
|
raise libs.action_errors(turbo_actions).join(', ')
|
184
184
|
end
|
185
185
|
|
186
|
+
unless save_action
|
187
|
+
RenderTurboStream::Libs.debug_save_errors(object, flash_controller_action_name)
|
188
|
+
end
|
189
|
+
|
186
190
|
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
187
191
|
#== RENDER TO CHANNEL
|
188
192
|
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
@@ -84,5 +84,16 @@ module RenderTurboStream
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
+
def self.debug_save_errors(object, controller_action_name)
|
88
|
+
if object.id.present?
|
89
|
+
Rails.logger.debug(" • #{controller_action_name} #{object.class}:#{object.id} FAILED:")
|
90
|
+
else
|
91
|
+
Rails.logger.debug(" • #{controller_action_name} #{object.class} FAILED:")
|
92
|
+
end
|
93
|
+
object.errors.full_messages.each do |e|
|
94
|
+
Rails.logger.debug(" => #{e}")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
87
98
|
end
|
88
99
|
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.
|
4
|
+
version: 4.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- christian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|