pg_rails 7.0.8.pre.alpha.59 → 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: b3d8524d771ec24a2b2728686f3823fe5f4d52ead73f969e99ba003361572b55
4
- data.tar.gz: 2d6efcc793a2b907ba38b974c6b437bae06e1fb9a4bf15554d2d90434a13dc9e
3
+ metadata.gz: 8848d2ec40bf17d44818d3f7c7b0f995d27928796938009d520c42a08067dc7f
4
+ data.tar.gz: 1064716fdafdb011dc4968fac27f5801c4c6378d02d1ed5d9fd1716b2dc54e8b
5
5
  SHA512:
6
- metadata.gz: 7fb40a82f52722779c7ac1dc58bc7c1d4c637ceed424861f8c927c7915c19d6c462e8800ee1e67dfcd9f5983052a7618967ffd84ee70ba8ba17771150b3bd677
7
- data.tar.gz: 378f705720ae31579b3105c88e0d9d422ed8ad4c26b88bd5140b5fb3830fbcd005c6285681b19065576bd2be91f12feb5b52c6d943d2f29bcdcf6bed2ba0d365
6
+ metadata.gz: 9ac17d43ca0881a1a21a509eb2003b24829aa78f1f1b0b493ccddda06b4914516d300d55db8d1db95d49e81cee675ae19b200c95516ba44c98c77b56aa986fcd
7
+ data.tar.gz: 023e7a19edc3f622c57ea622d9a184012b547ad89816745f07b8d048a0b208b9bedca6c8f483021eca02a041d554d73a29f803bf2766654b1915c028a4843f3e
@@ -13,14 +13,17 @@ module PgEngine
13
13
 
14
14
  # default delivery_method: :smtp
15
15
 
16
- rescue_from MailNotDelivered do |err|
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.59'
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.59
4
+ version: 7.0.8.pre.alpha.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso