render_turbo_stream 1.4.11 → 1.4.13

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: 6aaffdee6cb866e03e20f1b6d46e00d187e9f7a63b0d5f26c29b4615fae7b483
4
- data.tar.gz: b031dbf2eac68543ddf75de146c58715abaf3e6c6e9852119e3beb4f049832cc
3
+ metadata.gz: f7bcd60dee638218b100db8304ddda17a1d7c87df5c46d721cb541913a424abc
4
+ data.tar.gz: 6e606363c60175378ac3cf4a652560d44e5d3b49d98a77c6a0557ff679df67fa
5
5
  SHA512:
6
- metadata.gz: cec6a8701b17aabe2d76006771bd0441f28617a80bc16e9987d5334c84742d5df93471a7fb89d474b071fa2bd4f2391c78ea96abc3d8da8bc206198cf0268f64
7
- data.tar.gz: 77afb83d8a217eca87b53cfa0aee768cdd8272052540758976c266d72f7d532119e9260473d761743b57de64e252ba41c48ef927685ee90122a0ee0300749a46
6
+ metadata.gz: e7ca3b5b395709063ebd1c30577280527e064bff16e9dc4bcf114a1a0d1a60bda33bfe105a76f0f497a8fcc39fcf59cc0f877ca05a7688666d228fa577f9d85d
7
+ data.tar.gz: 0704ce40c37540bd5135f108668348b4b86fc21cef1d8a5e94ee41a7f5e1da593fd2ec82ea9b3f7e9d7a0c47e8432716cd094beb3dcb1de2e133487d146b047c
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "1.4.11"
2
+ VERSION = "1.4.13"
3
3
  end
@@ -47,9 +47,7 @@ module RenderTurboStream
47
47
 
48
48
  if save_action
49
49
  response.status = 200
50
- Rails.logger.debug('start loop')
51
50
  streams_on_success.each do |s|
52
- Rails.logger.debug('inside loop')
53
51
  if s.is_a?(Array)
54
52
  streams.push(s)
55
53
  elsif s.is_a?(Hash) && s[:id].present?
@@ -135,6 +133,8 @@ module RenderTurboStream
135
133
  response.status = 302
136
134
  flash[:alert] = flash_alerts
137
135
  flash[:notice] = flash_notices
136
+ Rails.logger.debug(" • Set flash[:alert] => #{flash_alerts}") if flash_alerts.present?
137
+ Rails.logger.debug(" • Set flash[:notice] => #{flash_notices}") if flash_notices.present?
138
138
  render_turbo_stream([
139
139
  [
140
140
  :redirect_to,
@@ -145,7 +145,8 @@ module RenderTurboStream
145
145
  response.status = 302
146
146
  flash[:alert] = flash_alerts
147
147
  flash[:notice] = flash_notices
148
- # render_turbo_stream(streams)
148
+ Rails.logger.debug(" • Set flash[:alert] => #{flash_alerts}") if flash_alerts.present?
149
+ Rails.logger.debug(" • Set flash[:notice] => #{flash_notices}") if flash_notices.present?
149
150
  redirect_to redirect_on_success_to
150
151
 
151
152
  else
@@ -159,7 +160,9 @@ module RenderTurboStream
159
160
 
160
161
  ary = []
161
162
  array.each do |pr|
162
- if pr.is_a?(Hash)
163
+ if !pr.present?
164
+ Rails.logger.warn " WARNING render_turbo_stream: Empty element inside attributes: «#{array}»"
165
+ elsif pr.is_a?(Hash)
163
166
  props = pr.symbolize_keys
164
167
  raise "missing attribute :id in #{props}" if !props[:id].present?
165
168
  part = (props[:partial].present? ? props[:partial] : props[:id]).gsub('-', '_')
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: 1.4.11
4
+ version: 1.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-25 00:00:00.000000000 Z
11
+ date: 2023-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails