render_turbo_stream 4.0.3 → 4.0.4

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: b7a06cc371f6543af918f87ee1d80f4c3e4c9640f10bc69b540d98ee1e5e7e20
4
- data.tar.gz: 69112643c6597fc51fd669d48b467bebcf100bb690f3028775cd661b72ce1568
3
+ metadata.gz: b5298cf405518f297f86cdd2581e39d618e3f750046335d425d5187035352380
4
+ data.tar.gz: 2cd649610255db9ca104884a472521f19af864f3f4f14eae5a2f55628f8b94ea
5
5
  SHA512:
6
- metadata.gz: a8790ae754ac41af06d4d375fd205eae8316c0b05551eace0c3aabe56572f7e91cd505aa40d9671d6856339468342319564bd1feea1815011cc3c097af499838
7
- data.tar.gz: 671730ab4d5df1918b05bd4a768336878f9d93a3cc0c43610359dd3847f85e7fd141cb6fbf99cfe6edae934afa247fa9fbb3db3d18106a02639b2a8b64478573
6
+ metadata.gz: 6a26003bfecef2adfd2b5cf263b06ce0106601e4c9893d25d3ab28d004ed7422324107c3d2f318047bb8b5b52a69e8887a36399a8bcec02761292480042b9eeb
7
+ data.tar.gz: 79810dadb98ec80ba893744767c7000b14f7bb98652c052d9ccfe8ee807ba17fc87045015c451521223aaebd51f924deef49e18546a6c04e11d143edaf2a3c36
@@ -137,8 +137,8 @@ module RenderTurboStream
137
137
 
138
138
  if_success_redirect_to: nil, # does a regular redirect. Works if you are inside a turbo_frame and just want to redirect inside that frame BUT CANNOT STREAM OTHERS ACTIONS ON THE SAME RESPONSE https://github.com/rails/rails/issues/48056
139
139
 
140
- if_success: nil, # hash for a partial to render or array with actions (as array) or hashes for partials within
141
- if_error: nil, # additional partials that should be rendered if save_action failed
140
+ if_success_add: nil, # hash for a partial to render or array with actions (as array) or hashes for partials within
141
+ if_error_add: nil, # additional partials that should be rendered if save_action failed
142
142
  add: [], # additional streams
143
143
 
144
144
  if_success_notices: nil, # array of strings, override default generated flash generation in the case of success
@@ -171,8 +171,8 @@ module RenderTurboStream
171
171
  )[:turbo_actions]
172
172
 
173
173
  turbo_actions += libs.additional_actions(
174
- if_success,
175
- if_error,
174
+ if_success_add,
175
+ if_error_add,
176
176
  add
177
177
  )
178
178
 
@@ -17,8 +17,8 @@ module RenderTurboStream
17
17
  action: 'replace', # options: append, prepend
18
18
  locals: {}, # locals used by the target_id
19
19
 
20
- if_success: nil, # hash for a partial to render or array with actions (as array) or hashes for partials within
21
- if_error: nil, # additional partials that should be rendered if save_action failed
20
+ if_success_add: nil, # hash for a partial to render or array with actions (as array) or hashes for partials within
21
+ if_error_add: nil, # additional partials that should be rendered if save_action failed
22
22
  add: [], # additional streams
23
23
 
24
24
  if_success_notices: nil, # array of strings, override default generated flash generation in the case of success
@@ -59,8 +59,8 @@ module RenderTurboStream
59
59
  streams += flashes[:turbo_actions]
60
60
 
61
61
  streams += libs.additional_actions(
62
- if_success,
63
- if_error,
62
+ if_success_add,
63
+ if_error_add,
64
64
  add
65
65
  )
66
66
 
@@ -89,9 +89,9 @@ module RenderTurboStream
89
89
  { turbo_actions: turbo_actions, alerts: alerts, notices: notices }
90
90
  end
91
91
 
92
- def additional_actions( if_success, if_error, add )
92
+ def additional_actions( if_success_add, if_error_add, add )
93
93
 
94
- (@save_action ? make_actions(if_success) : make_actions(if_error)) + make_actions(add)
94
+ (@save_action ? make_actions(if_success_add) : make_actions(if_error_add)) + make_actions(add)
95
95
 
96
96
  end
97
97
 
@@ -127,7 +127,7 @@ module RenderTurboStream
127
127
  private
128
128
 
129
129
  # streamline actions to array
130
- # valid inputs for if_success or if_error or add
130
+ # valid inputs for if_success_add or if_error_add or add
131
131
  # [:add_css_class, ...]
132
132
  # [[:add_css_class, ..], ..]
133
133
  # {target_id: '..', ..}
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "4.0.3"
2
+ VERSION = "4.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_turbo_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian