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: b7267e8e4cbcb083f89379501417b50ee9452f573e9df2ca3db731d89b314307
4
- data.tar.gz: 33c771a46e9c0cb0210b2cf0253fbfb6629652ba549857309c2c448a1872816d
3
+ metadata.gz: e7c77d7913ced14947092af6b05456c79581758a79ae83d9c4266cb6600a4922
4
+ data.tar.gz: 46b5b11f4f465b1956948996e3c9cfb47d79c8ea9becf03f76d32337320e4f1e
5
5
  SHA512:
6
- metadata.gz: 2e548748b5db6f7bd0ebdec11f2c56a1c2828fb3c711162a76d5ca9b978c057118604a4a8d8ce7bb42565ce00f9123770ada2aa619e73f80f3152e5a365c5421
7
- data.tar.gz: df6c1bcd7dc3b140ab73506ba8d94a43d62514192734b6024b3439c90fe8b0b7582af1dde2bb494a3e0e24314ad3e102e00387bc3fed49f3fc7fb954e22472ee
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.
@@ -197,7 +197,7 @@ module RenderTurboStream
197
197
  end
198
198
 
199
199
  if save_action && if_success_redirect_to.present?
200
- response.status = 302
200
+ response.status = 303
201
201
  redirect_to if_success_redirect_to
202
202
  end
203
203
 
@@ -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 = 302
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»")
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "4.3.9"
2
+ VERSION = "4.3.10"
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.9
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-26 00:00:00.000000000 Z
11
+ date: 2023-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails