pg_rails 7.1.1.pre.4 → 7.1.1.pre.5
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/concerns/pg_engine/resource.rb +3 -1
- data/pg_engine/app/controllers/pg_engine/base_controller.rb +6 -2
- data/pg_engine/app/controllers/users/confirmations_controller.rb +1 -1
- data/pg_engine/app/views/admin/eventos/new.html.slim +1 -1
- data/pg_engine/db/seeds.rb +3 -5
- data/pg_engine/lib/pg_engine/email_observer.rb +1 -1
- data/pg_engine/spec/factories/users.rb +2 -2
- data/pg_layout/app/views/layouts/pg_layout/base.html.slim +3 -0
- data/pg_layout/app/views/pg_layout/_modal_show.html.slim +9 -4
- data/pg_rails/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed654c2ed0008b0a029aafcf59fbf1fb11d681b091852cdf91075eb59027b4e
|
4
|
+
data.tar.gz: 8c5030277d34251d6e214697475c1e79121a40b1c5c9b757eb9ca95d04261bfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a334fbf6cf1e62e629bb231ab9ecca2300b30db6f04e1fb6360e7d9d2688a9399398d860cc0930418889b5960dfe900eb6e7bd8a7be8ff0e32d8e48513244b
|
7
|
+
data.tar.gz: f3686b6c215d38d54147e1506d7645b36ccf29ed2fde0dae04574662a649550d952deb5bce503a6ff3403dc98c77235364485e04e3dc4171f39af7ee4db672cf
|
@@ -160,7 +160,9 @@ module PgEngine
|
|
160
160
|
end
|
161
161
|
else
|
162
162
|
format.turbo_stream do
|
163
|
-
|
163
|
+
# Esto no es totalmente limpio pero funciona tanto en los listados como en los
|
164
|
+
# modal show
|
165
|
+
render turbo_stream: turbo_stream.remove(model) + turbo_stream.remove_all('.modal')
|
164
166
|
end
|
165
167
|
format.html do
|
166
168
|
redirect_back(fallback_location: root_path, notice: msg, status: 303)
|
@@ -112,8 +112,13 @@ module PgEngine
|
|
112
112
|
|
113
113
|
protected
|
114
114
|
|
115
|
-
# rubocop:disable Metrics/AbcSize
|
116
115
|
def render_my_component(component, status)
|
116
|
+
# Esto es para que saltee los turbo frames y genere
|
117
|
+
# un full reload. El turbo_no_cache no es estrictamente necesario
|
118
|
+
# pero lo dejo por las dudas
|
119
|
+
@turbo_page_requires_reload = true
|
120
|
+
@turbo_no_cache = true
|
121
|
+
|
117
122
|
respond_to do |format|
|
118
123
|
format.html do
|
119
124
|
render component.alert_wrapped(view_context),
|
@@ -139,7 +144,6 @@ module PgEngine
|
|
139
144
|
end
|
140
145
|
end
|
141
146
|
end
|
142
|
-
# rubocop:enable Metrics/AbcSize
|
143
147
|
|
144
148
|
def not_authorized(_arg_required_for_active_admin)
|
145
149
|
respond_to do |format|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Users
|
2
2
|
class ConfirmationsController < Devise::ConfirmationsController
|
3
3
|
# GET /resource/confirmation?confirmation_token=abcdef
|
4
|
-
def show
|
4
|
+
def show
|
5
5
|
self.resource = resource_class.confirm_by_token(params[:confirmation_token])
|
6
6
|
yield resource if block_given?
|
7
7
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= f.input :message, as: :text
|
7
7
|
- else
|
8
8
|
= f.rich_text_area :message
|
9
|
-
= f.input :message_text, as: :text
|
9
|
+
= f.input :message_text, as: :text, hint: 'Solo para emails, para la plain/text part'
|
10
10
|
= f.input :tooltip
|
11
11
|
= f.input :subject
|
12
12
|
= f.input :record_type
|
data/pg_engine/db/seeds.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
DatabaseCleaner.clean_with(:truncation, except: %w(ar_internal_metadata))
|
2
2
|
|
3
|
-
|
3
|
+
FactoryBot.create :user, email: 'mrosso10@gmail.com', nombre: 'Martín', apellido: 'Rosso', password: 'admin123',
|
4
|
+
confirmed_at: Time.now, developer: true
|
4
5
|
|
5
|
-
|
6
|
-
FactoryBot.create :user, email: MAIL, nombre: 'Martín', apellido: 'Rosso', password: 'admin123',
|
7
|
-
confirmed_at: Time.now, developer: true
|
8
|
-
end
|
6
|
+
Account.first.users << FactoryBot.create(:user, orphan: true)
|
@@ -37,8 +37,8 @@
|
|
37
37
|
|
38
38
|
FactoryBot.define do
|
39
39
|
factory :user, class: 'User' do
|
40
|
-
nombre { Faker::Name.
|
41
|
-
apellido { Faker::Name.
|
40
|
+
nombre { Faker::Name.first_name }
|
41
|
+
apellido { Faker::Name.last_name }
|
42
42
|
email { Faker::Internet.email }
|
43
43
|
password { "password#{rand(99_999)}" }
|
44
44
|
confirmed_at { Faker::Date.backward }
|
@@ -5,6 +5,9 @@ html
|
|
5
5
|
meta charset="UTF-8"
|
6
6
|
meta http-equiv="X-UA-Compatible" content="IE=edge"
|
7
7
|
meta name="viewport" content="width=device-width,initial-scale=1"
|
8
|
+
- if @turbo_page_requires_reload
|
9
|
+
meta name="turbo-visit-control" content="reload"
|
10
|
+
|
8
11
|
- cache :title_icon
|
9
12
|
title = t('app_name')
|
10
13
|
- begin
|
@@ -1,9 +1,14 @@
|
|
1
|
-
.modal.modal-lg.modal-asociable[tabindex="-1" data-controller="modal"
|
1
|
+
.modal.modal-lg.modal-asociable[tabindex="-1" data-controller="modal"
|
2
|
+
data-remove-on-hide="true" data-turbo-temporary="true"]
|
2
3
|
.modal-dialog
|
3
4
|
.modal-content
|
4
5
|
.modal-header
|
5
|
-
.
|
6
|
-
|
6
|
+
= link_to object.target_object do
|
7
|
+
| Ir al #{object.class.nombre_singular.downcase}
|
7
8
|
a.btn-close[type="button" data-bs-dismiss="modal" aria-label="Close"]
|
8
9
|
.modal-body
|
9
|
-
=
|
10
|
+
= turbo_frame_tag :modal_generic, target: :_top do
|
11
|
+
.float-end
|
12
|
+
= object.edit_link
|
13
|
+
= object.destroy_link
|
14
|
+
= render object
|
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.1.1.pre.
|
4
|
+
version: 7.1.1.pre.5
|
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-07-
|
11
|
+
date: 2024-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|