在Controller中,我有:mailer=MyReminderMailer.new邮件看起来像这样:classMyReminderMailer但出现错误:为MyReminderMailer:Class调用了私有(private)方法“new” 最佳答案 ActionMailer::Base有一个相当愚蠢和不直观的API。与Controller非常相似,您永远不会显式创建邮件程序的实例。相反,您将它们作为类进行交互。new在ActionMailer::Base中被标记为私有(private),并且类上的方法调用随后通过method