Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序有很多模块,如个人资料、地点、评论等。所以为了在发生新评论、新地点等有趣的事情时发送邮件,我是否需要创建许多邮件程序类(ProfileMailer、PlaceMailer、CommentMailer)和还有相应的观察者类来实现邮件?
我建议acts_as_loggable使用或类似的插件来跟踪您的应用程序中的不同事件(每当创建任何新事件时:地点、个人资料、评论),然后为记录的事件创建邮件程序。
acts_as_loggable