Thanks for your answer,
The thing is, the mails being sent with the scheduled jobs are not in a
Controller, they are in the UserMailer and they're easy to access via the
UserMailer.daily_mail(user).deliver_now
What I'd like to do, is having a similar thing with SMS. Maybe create a
SMSControlle
Hello Marco, as you can see, you can send email or sms in the same way. The
only thing you can do to avoid repetition, you should move the sms logic to
a service class and instantiate it in the controller and in a rake task to
send it from time to time.
I hope I helped you somehow.
2015-07-23 19:
I want send an SMS each 5 minutes to my users. At the moment, my
application sends an SMS during the creation of an account.
# users_controller.rb
def create
@user = User.new(user_params)
if @user.save
@user.send_activation_email
@user.send_da
3 matches
Mail list logo