pg_rails 7.0.8.pre.alpha.54 → 7.0.8.pre.alpha.55
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/controllers/pg_engine/base_controller.rb +1 -11
- data/pg_engine/spec/controllers/pg_engine/base_controller_spec.rb +1 -0
- data/pg_layout/app/views/pg_layout/_default_error_message.html.erb +11 -0
- data/pg_layout/app/views/pg_layout/_error.html.erb +13 -0
- data/pg_layout/app/views/pg_layout/error.html.erb +2 -11
- data/pg_rails/lib/version.rb +1 -1
- data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/controller_spec.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3988a9c0d903ba20bb3cd83e2c5cacce2b4be38e630ebadc216bf55953bf349
|
4
|
+
data.tar.gz: 491bdc7eea79682ac8d34e2f04619c6f5a69be94fccc4d27de4874b0d42c5035
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e6f9f80d69ca2de0a80f4d2684fd0aea928cb4c9bc93d168c9e6eb1e2ce37ec8982cfffbf8a0c74e0aecef8a23c0f32ab63deb98977e6033df0e35481c8047
|
7
|
+
data.tar.gz: af872ab696c047befe1000bf53c5c493390ca449fdb904d5507c7239fac28eb1de6b3a40be031926daf9fe3de5dafcfa9c3aea10c7fdab2f2367a75d3d0cf21a
|
@@ -31,22 +31,12 @@ module PgEngine
|
|
31
31
|
def internal_error(error)
|
32
32
|
pg_err error
|
33
33
|
|
34
|
-
@error_msg = <<~HTML.html_safe # rubocop:disable Rails/OutputSafety
|
35
|
-
<div>
|
36
|
-
Ocurrió algo inesperado
|
37
|
-
<br>
|
38
|
-
Por favor, intentá nuevamente
|
39
|
-
<br>
|
40
|
-
o <a class="text-decoration-underline" href="#{new_public_mensaje_contacto_path}">ponete en contacto</a> y pronto lo resolveremos
|
41
|
-
</div>
|
42
|
-
HTML
|
43
|
-
|
44
34
|
respond_to do |format|
|
45
35
|
format.html do
|
46
36
|
render 'pg_layout/error', layout: 'pg_layout/containerized'
|
47
37
|
end
|
48
38
|
format.turbo_stream do
|
49
|
-
flash.now[:critical] =
|
39
|
+
flash.now[:critical] = self.class.render(partial: 'pg_layout/default_error_message')
|
50
40
|
render turbo_stream: (turbo_stream.remove_all('.modal') + render_turbo_stream_flash_messages)
|
51
41
|
end
|
52
42
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# locals: (error_msg: nil) %>
|
2
|
+
|
3
|
+
<div>
|
4
|
+
<%= error_msg || 'Ocurrió algo inesperado' %>
|
5
|
+
<br>
|
6
|
+
Por favor, intentá nuevamente
|
7
|
+
<br>
|
8
|
+
o <a class="text-decoration-underline" href="<%= new_public_mensaje_contacto_path %>">dejanos un mensaje</a>
|
9
|
+
<br>
|
10
|
+
y te avisaremos cuando el problema esté resuelto.
|
11
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# locals: (error_msg: nil) %>
|
2
|
+
|
3
|
+
<div class="d-flex justify-content-around">
|
4
|
+
<div class="alert alert-danger d-flex align-items-center">
|
5
|
+
<div>
|
6
|
+
<span class="bi bi-emoji-dizzy fs-1 me-3"></span>
|
7
|
+
<%# <span class="bi bi-exclamation-triangle fs-1 me-3"></span> %>
|
8
|
+
</div>
|
9
|
+
<div>
|
10
|
+
<%= render partial: 'pg_layout/default_error_message', locals: { error_msg: } %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
@@ -1,11 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<div>
|
4
|
-
<span class="bi bi-emoji-dizzy fs-1 me-3"></span>
|
5
|
-
<%# <span class="bi bi-exclamation-triangle fs-1 me-3"></span> %>
|
6
|
-
</div>
|
7
|
-
<div>
|
8
|
-
<%= @error_msg %>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
</div>
|
1
|
+
<%# Se renderea en el rescue de base_controller %>
|
2
|
+
<%= render partial: 'pg_layout/error' %>
|
data/pg_rails/lib/version.rb
CHANGED
@@ -241,7 +241,7 @@ RSpec.describe <%= controller_class_name %>Controller do
|
|
241
241
|
|
242
242
|
describe 'DELETE #destroy' do
|
243
243
|
subject do
|
244
|
-
request.headers['Accept'] =
|
244
|
+
request.headers['Accept'] = 'text/vnd.turbo-stream.html,text/html'
|
245
245
|
delete :destroy, params: { id: <%= file_name %>.to_param, redirect_to: redirect_url }
|
246
246
|
end
|
247
247
|
|
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.
|
4
|
+
version: 7.0.8.pre.alpha.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
@@ -1012,6 +1012,8 @@ files:
|
|
1012
1012
|
- pg_layout/app/views/layouts/pg_layout/container_logo.html.slim
|
1013
1013
|
- pg_layout/app/views/layouts/pg_layout/containerized.html.slim
|
1014
1014
|
- pg_layout/app/views/layouts/pg_layout/devise.html.slim
|
1015
|
+
- pg_layout/app/views/pg_layout/_default_error_message.html.erb
|
1016
|
+
- pg_layout/app/views/pg_layout/_error.html.erb
|
1015
1017
|
- pg_layout/app/views/pg_layout/_flash.html.slim
|
1016
1018
|
- pg_layout/app/views/pg_layout/_flash_container.html.slim
|
1017
1019
|
- pg_layout/app/views/pg_layout/_navbar.html.erb
|