我有一個簡單的軌道5應用與裝置和後每當我嘗試註冊,我得到以下錯誤:Rails的5:NoMethodError:未定義的方法`幫手」的MyMailer
NoMethodError in Devise::RegistrationsController#create undefined method `helper' for MyMailer(Table doesn't exist):Class
在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
你知道爲什麼這個類無法找到我的應用程序助手嗎?
你爲什麼不用'include ApplicationHelper'? – dp7