pg_rails 7.0.8.pre.alpha.89 → 7.0.8.pre.alpha.91
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/components/bad_request_component.rb +1 -1
- data/pg_engine/app/components/base_component.rb +3 -3
- data/pg_engine/app/components/internal_error_component.rb +1 -1
- data/pg_engine/app/controllers/pg_engine/base_controller.rb +4 -4
- data/pg_rails/lib/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0add80789e228fa1d0540ec0cd76fa458a6bce695d171813b43047608a930980
|
4
|
+
data.tar.gz: 114d7d400e5f6d5f42a99454e365f6bd9cffe5d190d982be1d1aff66957ce646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e5bad46380cec016f7a567a6ccef77f16ca32c364b1f09f0fb753c03afc6d4bc0d42b8823ded44f46c5300c487b33e7863724e8b7775c51efbf26862517a8ad
|
7
|
+
data.tar.gz: 632abbaea6dbed4429648148125c65985a99a2648b1f97dd971d089794363bbd522000d170d2eae07bc5d6f023027d31748dd3bdeee359a076d7efa96055cfe0
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class BaseComponent < ViewComponent::Base
|
2
|
-
def
|
2
|
+
def alert_wrapped(view_context)
|
3
3
|
AlertComponent.new(type: alert_type)
|
4
|
-
.with_content(
|
4
|
+
.with_content(render_in(view_context))
|
5
5
|
end
|
6
6
|
|
7
|
-
def
|
7
|
+
def alert_type
|
8
8
|
# :nocov:
|
9
9
|
raise 'implement in subclass'
|
10
10
|
# :nocov:
|
@@ -34,13 +34,13 @@ module PgEngine
|
|
34
34
|
def internal_error(error)
|
35
35
|
pg_err error
|
36
36
|
|
37
|
-
render_my_component(InternalErrorComponent, :internal_server_error)
|
37
|
+
render_my_component(InternalErrorComponent.new, :internal_server_error)
|
38
38
|
end
|
39
39
|
|
40
40
|
def invalid_authenticity_token(err)
|
41
41
|
pg_warn err
|
42
42
|
|
43
|
-
render_my_component(BadRequestComponent, :bad_request)
|
43
|
+
render_my_component(BadRequestComponent.new, :bad_request)
|
44
44
|
end
|
45
45
|
|
46
46
|
before_action do
|
@@ -91,7 +91,7 @@ module PgEngine
|
|
91
91
|
|
92
92
|
protected
|
93
93
|
|
94
|
-
def render_my_component(component, status)
|
94
|
+
def render_my_component(component, status)
|
95
95
|
respond_to do |format|
|
96
96
|
format.html do
|
97
97
|
render component.alert_wrapped(view_context),
|
@@ -100,7 +100,7 @@ module PgEngine
|
|
100
100
|
end
|
101
101
|
|
102
102
|
format.turbo_stream do
|
103
|
-
flash.now[component.alert_type] = component.
|
103
|
+
flash.now[component.alert_type] = component.render_in(view_context)
|
104
104
|
|
105
105
|
render turbo_stream: (turbo_stream.remove_all('.modal') +
|
106
106
|
render_turbo_stream_flash_messages),
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.
|
4
|
+
version: 7.0.8.pre.alpha.91
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.1.3.
|
19
|
+
version: 7.1.3.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.1.3.
|
26
|
+
version: 7.1.3.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: anycable
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -422,14 +422,14 @@ dependencies:
|
|
422
422
|
requirements:
|
423
423
|
- - "~>"
|
424
424
|
- !ruby/object:Gem::Version
|
425
|
-
version: 3.2.
|
425
|
+
version: 3.2.2
|
426
426
|
type: :runtime
|
427
427
|
prerelease: false
|
428
428
|
version_requirements: !ruby/object:Gem::Requirement
|
429
429
|
requirements:
|
430
430
|
- - "~>"
|
431
431
|
- !ruby/object:Gem::Version
|
432
|
-
version: 3.2.
|
432
|
+
version: 3.2.2
|
433
433
|
- !ruby/object:Gem::Dependency
|
434
434
|
name: sassc
|
435
435
|
requirement: !ruby/object:Gem::Requirement
|