Class: EacRailsBase0::EmailSendTest
- Inherits:
-
EacRailsUtils::Models::Tableless
- Object
- EacRailsUtils::Models::Tableless
- EacRailsBase0::EmailSendTest
- Defined in:
- app/tableless_models/eac_rails_base0/email_send_test.rb
Instance Method Summary collapse
Instance Method Details
#address ⇒ Object
20 21 22 |
# File 'app/tableless_models/eac_rails_base0/email_send_test.rb', line 20 def address alternative_address.presence || logged_user_address.presence end |
#logged_user_address ⇒ Object
24 25 26 |
# File 'app/tableless_models/eac_rails_base0/email_send_test.rb', line 24 def logged_user_address ::EacUsersSupport::User.current_user.if_present(&:email) end |
#save ⇒ Object
13 14 15 16 17 18 |
# File 'app/tableless_models/eac_rails_base0/email_send_test.rb', line 13 def save return false unless valid? send_mail true end |
#send_mail ⇒ Object
28 29 30 |
# File 'app/tableless_models/eac_rails_base0/email_send_test.rb', line 28 def send_mail ::EacRailsBase0::SendTestMailer.with(address: address).main.deliver_later end |