0

i create a sign in /up with devise for my app rails , and i would like just send a email of welcoming but without confirmable or redirecting,

"devise :confirmable, ...

has_many :emails
delegate :confirmation_sent_at, :confirmed_at, :confirmation_token, to: :primary_email

def primary_email
  emails.primary || (emails.first if new_record?)
end"

i read the documentation of devise but i didn't find ( or understand) my answer.

thx for your help i am new in the community and don't speak english well.

uzaif
  • 3,511
  • 2
  • 21
  • 33
zato
  • 15
  • 1
  • 5

1 Answers1

0

You can set up an after_action in the model to send an email.

model

after_action :send_welcome_email, only: [:sign_up]

You will need to create the send_welcome_email yourself. Look up actionMailer which will give you an idea of what you need to do.

margo
  • 2,927
  • 1
  • 14
  • 31