应用程序/服务/mail_service
class MailService
def subscribe
code
end
end
用户模型
class User < ActiveRecord::Base
after_create :user_subscribe
def user_subscribe
Services::MailService.new
end
end
它显示错误,例如uninitialized constant Services
应用程序/服务/mail_service
class MailService
def subscribe
code
end
end
用户模型
class User < ActiveRecord::Base
after_create :user_subscribe
def user_subscribe
Services::MailService.new
end
end
它显示错误,例如uninitialized constant Services