pg_rails 7.0.8.pre.alpha.60 → 7.0.8.pre.alpha.61

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: 3eb3aafda57a8e794a17ccabaf1b6e644332a7f55809b758deda8aa8c997f518
4
- data.tar.gz: d71a2873a4d5edb08068b22251c06f2b9228ff597ddc4ff76ede7a904f9de34f
3
+ metadata.gz: 8848d2ec40bf17d44818d3f7c7b0f995d27928796938009d520c42a08067dc7f
4
+ data.tar.gz: 1064716fdafdb011dc4968fac27f5801c4c6378d02d1ed5d9fd1716b2dc54e8b
5
5
  SHA512:
6
- metadata.gz: 7ae29225d2bc35ef096a3dd1d5ab7bf77065ad83ac636e76b6c061bafd7704f71639cef9a128d09ec5cf6ef8171e2b26f0cb542e7c1ce4db2cd43c603aeaee2f
7
- data.tar.gz: 570053dacc414063f5d9a767f662a8436117df5b655ba9b2e534021ea674b014f8d9a6a4fb504453024737c0961070f366635dac1a2c8f40dd6db2e4772a3792
6
+ metadata.gz: 9ac17d43ca0881a1a21a509eb2003b24829aa78f1f1b0b493ccddda06b4914516d300d55db8d1db95d49e81cee675ae19b200c95516ba44c98c77b56aa986fcd
7
+ data.tar.gz: 023e7a19edc3f622c57ea622d9a184012b547ad89816745f07b8d048a0b208b9bedca6c8f483021eca02a041d554d73a29f803bf2766654b1915c028a4843f3e
@@ -15,12 +15,15 @@ module PgEngine
15
15
 
16
16
  rescue_from StandardError do |err|
17
17
  pg_warn err, :error
18
- @email.update_columns(status: :failed, status_detail: err.to_s) # rubocop:disable Rails/SkipsModelValidations
18
+ if @email.present?
19
+ @email.update_columns(status: :failed, status_detail: err.to_s) # rubocop:disable Rails/SkipsModelValidations
20
+ end
19
21
  end
20
22
 
21
23
  protected
22
24
 
23
25
  def mail(*args)
26
+ @footer_href = root_url(m: @email.hashid)
24
27
  super(*args).tap do |message|
25
28
  # message.mailgun_options = {
26
29
  # 'tag' => email.tags,
@@ -35,4 +38,3 @@ end
35
38
  # # TODO: testear
36
39
  # si from está vacío
37
40
  # si body está vacío
38
- # si se lanza PgEngine::BaseMailer::MailNotDelivered
@@ -33,6 +33,7 @@
33
33
  #
34
34
 
35
35
  class Email < ApplicationRecord
36
+ include Hashid::Rails
36
37
  audited
37
38
 
38
39
  has_one_attached :encoded_eml
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.60'
4
+ VERSION = '7.0.8-alpha.61'
5
5
  end
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.60
4
+ version: 7.0.8.pre.alpha.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso