I have a simple rails 5 application with devise and whenever I try to signup, I get the following error:
NoMethodError in Devise::RegistrationsController#create undefined method `helper' for MyMailer(Table doesn't exist):Class
The error occurs in line 2:
class MyMailer < ApplicationRecord
helper :application # gives access to all helpers defined within `application_helper`.
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
default template_path: 'devise/mailer' # to make sure that your mailer uses the devise views
end
Do you have any idea why this class cannot find my application helpers?
include ApplicationHelper
? – dp7