pg_rails 7.0.8.pre.alpha.60 → 7.0.8.pre.alpha.62

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: afcf64379ab25a58e3b1d626f71371cc63448503880d182b8ad1e1164dbccf7e
4
+ data.tar.gz: 9917f1be640ccdbabbc1d7c12ca561d5714f1b4227e3899c3c1cc96749157284
5
5
  SHA512:
6
- metadata.gz: 7ae29225d2bc35ef096a3dd1d5ab7bf77065ad83ac636e76b6c061bafd7704f71639cef9a128d09ec5cf6ef8171e2b26f0cb542e7c1ce4db2cd43c603aeaee2f
7
- data.tar.gz: 570053dacc414063f5d9a767f662a8436117df5b655ba9b2e534021ea674b014f8d9a6a4fb504453024737c0961070f366635dac1a2c8f40dd6db2e4772a3792
6
+ metadata.gz: a620ba16efe37ac2794a11676bcecb89ad101053abcb04147a246b2c3d074de03799b01d1d0ad7578855d05347f793aec52a62a6722a4e755ee161aa156a98bf
7
+ data.tar.gz: 8d63151e40a4a105137d3a097b9ec09690c159b2130620d078bc5c428895522631c5ffc732acd20b4cd32094470f2e72aca5a05050e13cfc8381207662d61c2a
@@ -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
@@ -66,6 +66,10 @@ class User < ApplicationRecord
66
66
  !persisted? || !password.nil? || !password_confirmation.nil?
67
67
  end
68
68
 
69
+ def remember_me
70
+ true
71
+ end
72
+
69
73
  scope :query, ->(param) { where('email ILIKE ?', "%#{param}%") }
70
74
 
71
75
  def to_s
@@ -164,7 +164,7 @@ Devise.setup do |config|
164
164
 
165
165
  # ==> Configuration for :rememberable
166
166
  # The time the user will be remembered without asking for credentials again.
167
- config.remember_for = 60.days
167
+ config.remember_for = 40.days
168
168
 
169
169
  # Invalidates all the remember me tokens when the user signs out.
170
170
  config.expire_all_remember_me_on_sign_out = true
@@ -81,8 +81,11 @@ es:
81
81
  attributes:
82
82
  user:
83
83
  remember_me: Mantener sesión abierta
84
-
85
-
84
+ email:
85
+ from_name: Remitente
86
+ to: Destinatario
87
+ subject: Asunto
88
+ body_input: Mensaje
86
89
 
87
90
 
88
91
  # es:
@@ -10,7 +10,7 @@
10
10
  <%= f.input :password,
11
11
  required: false,
12
12
  input_html: { autocomplete: "current-password" } %>
13
- <%#= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
13
+ <%= f.input :remember_me, as: :hidden if devise_mapping.rememberable? %>
14
14
  </div>
15
15
 
16
16
  <div class="form-actions">
@@ -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.62'
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.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso