pg_rails 7.0.8.pre.alpha.75 → 7.0.8.pre.alpha.76

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: 46472fd017bf8657e28b3d968159b206c7c2ab8118a4744b5ae887e38c6c0d57
4
- data.tar.gz: f0ecdadba8aaac1a640c74bc17ce6a182a0b0e4af138e5275d01c35a082b4bf7
3
+ metadata.gz: 1e72fb52c1042404baaf142d2b8a3e83eb75cd8034e4ba58ca7c862054cfe8d8
4
+ data.tar.gz: 7f2cf6cd1ae8089fdeba57501d7d990fe9c59fc7a713b21068a16772a0506c17
5
5
  SHA512:
6
- metadata.gz: 7cc3574cfed47ad618319c9320836ea0a7941c9951226f82cacf20dd885a7d8ba425361fefb53cbd64fb52a7b1af62d681a60da0ba3a8de2bc120977383ca489
7
- data.tar.gz: 16b08e59ac08a38348d08f88f591d32f2349d5f3baa188235bb57d57352213b3a224364be53a03da371971df4e1ba0f4f91e5b0fc5a9fd9b8deca7c8b5d2a25d
6
+ metadata.gz: 28be79030af6d2cf172da55d757d040b414e166cda53960fd66f982d3dd36f36b829c45e835d798425a50bd38609d3b2c1ca3ab5d0536983ffd3d3b3e38bd2d6
7
+ data.tar.gz: 6c88a919dafb6e96c03214d0a7d91d6e4293752e0323b6a5fec3e0c1d97750b541e6af8000ce8f21e3057dbfb0159d44fe4d5644076046992144207261aa31f6
@@ -21,7 +21,6 @@ module PgEngine
21
21
  def render_unconfirmed
22
22
  self.content_type = 'text/vnd.turbo-stream.html'
23
23
  self.status = 200
24
- # TODO: poner data-turbo-temporary?
25
24
  self.response_body = <<~HTML
26
25
  <turbo-stream action="update" target="flash">
27
26
  <template>
@@ -27,7 +27,7 @@ class PgFormBuilder < SimpleForm::FormBuilder
27
27
  end
28
28
 
29
29
  def mensajes_de_error
30
- # TODO: poner data-turbo-temporary?
30
+ # TODO: quitar en before-cache?
31
31
  title = error_notification(message: mensaje, class: 'text-danger mb-2 error-title') if mensaje
32
32
 
33
33
  base_errors = object.errors[:base]
@@ -37,6 +37,9 @@ document.addEventListener('turbo:load', bindAndObserveToasts)
37
37
  document.addEventListener('turbo:render', bindAndObserveToasts)
38
38
 
39
39
  document.addEventListener('turbo:before-cache', () => {
40
+ document.querySelectorAll('#flash .alert').forEach((el) => {
41
+ el.remove()
42
+ })
40
43
  document.querySelectorAll('.offcanvas-backdrop').forEach((el) => {
41
44
  el.remove()
42
45
  })
@@ -38,9 +38,9 @@ class Navbar
38
38
  path: eval(item['path']),
39
39
  show: item['policy'] ? eval(item['policy']) : true
40
40
  }
41
- rescue StandardError
41
+ rescue StandardError => e
42
42
  # TODO!: testear
43
- pg_err item
43
+ pg_err e, item
44
44
  return []
45
45
  end
46
46
  # rubocop:enable Security/Eval
@@ -1,6 +1,6 @@
1
1
  <%# locals: (error_msg: nil) %>
2
2
 
3
- <div class="d-flex justify-content-around mt-2" data-turbo-temporary="true">
3
+ <div class="d-flex justify-content-around mt-2">
4
4
  <div class="alert alert-danger d-flex align-items-center">
5
5
  <div>
6
6
  <span class="bi bi-emoji-dizzy fs-1 me-3"></span>
@@ -5,7 +5,7 @@
5
5
  mt-2 d-flex align-items-center
6
6
  alert-#{flash_type_to_class(flash_type)}
7
7
  #{'position-absolute pg-toast' if toast}"
8
- data-turbo-temporary="true" data-bs-autohide="true"
8
+ data-bs-autohide="true"
9
9
  aria-live="assertive" aria-atomic="true" role="alert"
10
10
  ]
11
11
  - case flash_type
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.75'
4
+ VERSION = '7.0.8-alpha.76'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.pre.alpha.75
4
+ version: 7.0.8.pre.alpha.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso