render_turbo_stream 0.1.27 → 0.1.28
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 +4 -4
- data/README.md +4 -4
- data/lib/render_turbo_stream/test_helpers.rb +1 -1
- data/lib/render_turbo_stream/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ddfe2fddf5d0990264594bd1bac97f8ad8846d344e63446a1b7d5ac263c0c9d
|
4
|
+
data.tar.gz: 0e56a273cc7cd654e5be6957565c982be9b8ad1fa2a0fa1155f97c5e6815cae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b25b72283be57909d4085752c0457b2db91de7174df9e8e83f3daf1da784eaca70b509fa1fa5ed28c6cf9f8896916679265914c28db8a0fb00117479d0c858
|
7
|
+
data.tar.gz: 7d8ed294add44a776cd5e5fdfefd51380ef7af5063543fa49cac33155df50a9448966cc1c5599731d665aa0fc9ac1d2bea9fbdfc7a35af44b612c3c18680bed9
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ The corresponding partials for flashes could look [like this](https://gitlab.com
|
|
54
54
|
end
|
55
55
|
```
|
56
56
|
|
57
|
-
This will set a status, generate a flash message and perform `stream_partials
|
57
|
+
This will set a status, generate a flash message and perform `stream_partials`, which could result in something like this:
|
58
58
|
|
59
59
|
```ruby
|
60
60
|
stream_partials(
|
@@ -72,7 +72,7 @@ stream_partials(
|
|
72
72
|
)
|
73
73
|
```
|
74
74
|
|
75
|
-
The `stream_partial
|
75
|
+
The `stream_partial` method is nothing else than a singular of `stream_partials`.
|
76
76
|
|
77
77
|
```ruby
|
78
78
|
stream_partial(
|
@@ -108,7 +108,7 @@ RSpec.describe "Articles", type: :request do
|
|
108
108
|
# which partials where rendered
|
109
109
|
expect(partials_paths).to include('layouts/flash', 'articles/form')
|
110
110
|
|
111
|
-
# partial_response (singular) returns false unless partial responded exactly one time, otherwise the content
|
111
|
+
# partial_response (singular) returns false unless partial responded exactly one time, otherwise the content parsed by nokogiri, see how to handle: https://nokogiri.org/tutorials/searching_a_xml_html_document.html#basic-searching
|
112
112
|
r = partial_response(id: 'flash-box')
|
113
113
|
expect(r.css('div.text-content').first.inner_html).to include('Article could not be created')
|
114
114
|
|
@@ -131,7 +131,7 @@ The test for a redirection might look something like this:
|
|
131
131
|
it 'update success' do
|
132
132
|
a = FactoryBot.create(:article)
|
133
133
|
patch article_path(a, params: valid_params)
|
134
|
-
expect(
|
134
|
+
expect(turbo_redirect_to).to eq(articles_path)
|
135
135
|
end
|
136
136
|
```
|
137
137
|
|