I have this in my controller:
def create
@user = User.new(user_params)
if @user.save
UserMailer.account_activation(@user).deliver_now
....
end
And I keep getting this error:
NoMethodError: undefined method `deliver_now' for #<ActionMailer::MessageDelivery:0x007ffa6646eb60>
Any ideas why it's not finding the deliver_now method?
deliver_now
has been introduced in rails 4.2.beta2. You are probably using earlier version.
I think it's because it's deliver
(or deliver!
for the bang version) and not deliver_now
.
See ActionMailer::Base
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With