pg_rails 7.0.8.pre.alpha.54 → 7.0.8.pre.alpha.56
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 +13 -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: f7a80ab1d7122dd57f2e7a7d22a28c8c276bcaafd69da7cbf662ce630420fde9
|
4
|
+
data.tar.gz: 7f28e94ae447b35715c01dfa3c130db7bdc5ab2972a10f30e082fc6edd0fb60d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17bfb418de01d503c8e66bba436a31bf0d807396336e343f3bc202aef3ecadd665227329023b9b5d5f244b6be66ba7f6cadb44cafba90e8b706ee33b1461882e
|
7
|
+
data.tar.gz: f2cc161384fb6316203459232f9ccb97b6b3c2f5832cc4a143ee5f27fb460da8247f0046ba5b470659d54beb62c463d5bfaa905c9fd7e5a4093a7e3402207943
|
@@ -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,13 @@
|
|
1
|
+
<%# locals: (error_msg: nil) %>
|
2
|
+
|
3
|
+
<div>
|
4
|
+
<div class="mb-1">
|
5
|
+
<%= error_msg || 'Ocurrió algo inesperado' %>
|
6
|
+
</div>
|
7
|
+
Por favor, intentá nuevamente
|
8
|
+
<br>
|
9
|
+
o <a class="text-decoration-underline" href="<%= new_public_mensaje_contacto_path %>">dejá un mensaje</a>
|
10
|
+
para que te avisemos
|
11
|
+
<br>
|
12
|
+
cuando el problema esté resuelto 🙏
|
13
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# locals: (error_msg: nil) %>
|
2
|
+
|
3
|
+
<div class="d-flex justify-content-around mt-2">
|
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.56
|
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
|