render_turbo_stream 4.3.9 → 4.3.10
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7c77d7913ced14947092af6b05456c79581758a79ae83d9c4266cb6600a4922
|
4
|
+
data.tar.gz: 46b5b11f4f465b1956948996e3c9cfb47d79c8ea9becf03f76d32337320e4f1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ece99c25ab9f6dc65d72c8d16993c81d1c6f4f0681414e14d6bff78c49e37494d3e3ddcd567b1acc10b0b642b22bbb458800167dd0e327dcabce679a712fa2f
|
7
|
+
data.tar.gz: e71788a07ca646d45ae6efe9fcbe536a52adb74c0c57435757949b9acbcd1f8f2f8468382f2449c2b8fa10c2efd75706efca88d4a8ea29aab732b4e1bc30d972
|
data/README.md
CHANGED
@@ -193,6 +193,7 @@ The target ID for turbo has to be unique for sure, and it has to be nice, becaus
|
|
193
193
|
```ruby
|
194
194
|
# target_id(virtual_view_path, object)
|
195
195
|
target_id('customers/_form', Customer.new) #=> 'new-customer-form'
|
196
|
+
target_id('form', Customer.new) #=> 'new-customer-form'
|
196
197
|
```
|
197
198
|
|
198
199
|
View-helper: Assuming we are inside `customers/_my_form`:
|
@@ -206,7 +207,8 @@ target_id(Customer.first) #=> 'customer-1-my-form'
|
|
206
207
|
target_id( [Customer.first, Article.last, 'hello'] ) #=> 'customer-1-article-7-hello-my-form'
|
207
208
|
target_id('hi-joe') #=> 'hi-joe'
|
208
209
|
|
209
|
-
target_id_css('hi-joe') #=> '#hi-joe'
|
210
|
+
target_id_css('hi-joe') #=> '#hi-joe'
|
211
|
+
#=> is available for system tests, example for capybara: «within target_id_css('articles/_form', @article) do ..
|
210
212
|
```
|
211
213
|
|
212
214
|
Why include the filename in a html-id? Because for turbo its likely to have multiple cases for the same object on the same page, for example: _form, _show, _password. These can all be the same customer.
|
@@ -76,7 +76,7 @@ module RenderTurboStream
|
|
76
76
|
allow_channel = (Rails.configuration.x.render_turbo_stream.allow_channel_to_me_for_turbo_stream_save rescue false) && (helpers.current_user.id.present? rescue false)
|
77
77
|
|
78
78
|
if save_action && if_success_turbo_redirect_to.present?
|
79
|
-
response.status =
|
79
|
+
response.status = 303
|
80
80
|
flash[:alert] = flashes[:alerts]
|
81
81
|
flash[:notice] = flashes[:notices]
|
82
82
|
Rails.logger.debug(" • Successful saved && Redirect by «turbo_redirect_to»")
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- christian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|