pg_rails 7.6.22.pre.2 → 7.6.22.pre.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e11eaaf87267c270b7a5dc436af8bc9408b06c98f576f83131e1f0dc8bc90fd1
|
4
|
+
data.tar.gz: 102b832b63cefc8ad4036af4fbbf4737fb3b7bffba8a3c265e9bad027a91ff46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 638c860b8f356d0fca74690f744f80ea103cfe637cb15e6619e49d98f70f4f9288d26cfcf17896211f656a707b6eab7565e0145e02f84ea260a5a39a8a0faade
|
7
|
+
data.tar.gz: 07e01cadab3025d652009783410535ccf47037a33d1f1cbb26e9f18020e36b6c34ba05886d78d5112ac95cbd1e885515a7f3c3a2be4333b61bfa75955964c7ea
|
@@ -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