pg_rails 7.6.22.pre.2 → 7.6.22
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/lib/pg_engine/default_url_options.rb +19 -1
- data/pg_engine/config/initializers/action_mailer.rb +9 -0
- data/pg_engine/lib/pg_engine/test/dummy_brand.rb +0 -1
- data/pg_layout/app/views/layouts/pg_layout/base.html.slim +1 -1
- data/pg_rails/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba5c6d7d214fdfee7b74981aec959f7ab5b0b993ef14527d6fc50024aa2e90be
|
4
|
+
data.tar.gz: 72d42c66107bafeabfd63f9249223ddb33317edfbacf296e432a88c280d1452e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb4e10fe0f30f27a36509b16051abade54c8c84c8a3f0141d54910a2d671b534dabea23c1dda48d3f2500339e3e539e22813ddbd8d0b7e225a114ef6e193b42b
|
7
|
+
data.tar.gz: b3a897a09bd7f58c85aa783cc7ee8e10ff145afa75d515d16a1fd48006c029c4fbd3a41f16707b805d34700a4c5150c18ab6c252e80a731c07fda1a581962d19
|
@@ -7,12 +7,30 @@ module PgEngine
|
|
7
7
|
# Aparentemente es necesario definir url_options cuando los parámetros
|
8
8
|
# pueden cambiar a lo largo del lifecycle de la request
|
9
9
|
def url_options
|
10
|
-
super
|
10
|
+
base = if defined? super
|
11
|
+
super
|
12
|
+
else
|
13
|
+
{}
|
14
|
+
end
|
15
|
+
|
16
|
+
base.merge(_brand_options_with_tid)
|
11
17
|
end
|
12
18
|
|
13
19
|
# Aunque parece intuitivo que se podría definir solamente url_options,
|
14
20
|
# es importante que default_url_options también esté definido
|
15
21
|
def default_url_options
|
22
|
+
# Hay contextos en que está definido el método, como en los controllers
|
23
|
+
# y otros en los que no, como la Navbar
|
24
|
+
base = if defined? super
|
25
|
+
super
|
26
|
+
else
|
27
|
+
{}
|
28
|
+
end
|
29
|
+
|
30
|
+
base.merge(_brand_options_with_tid)
|
31
|
+
end
|
32
|
+
|
33
|
+
def _brand_options_with_tid
|
16
34
|
PgEngine.site_brand.default_url_options.merge(tid: _current_tid)
|
17
35
|
end
|
18
36
|
|
@@ -21,3 +21,12 @@ ActionMailer::MailDeliveryJob.rescue_from EOFError,
|
|
21
21
|
end
|
22
22
|
|
23
23
|
ActionMailer::Base.register_observer(PgEngine::EmailObserver)
|
24
|
+
|
25
|
+
if Rails.env.development?
|
26
|
+
ActionMailer::Preview.class_eval do
|
27
|
+
def initialize(params = {})
|
28
|
+
@params = params
|
29
|
+
Current.app_name = params[:app_name]&.to_sym
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/pg_rails/lib/version.rb
CHANGED