我正在处理与电子邮件通知相关的侨民*问题:
私下帖子:在电子邮件通知中显示链接(无文本(
公开帖子:在电子邮件通知中显示摘要和链接
这是我对侨民的拉取请求*: https://github.com/diaspora/diaspora/pull/4508
链接到我的Github存储库:https://github.com/railsgirls-generator-app/diaspora/tree/4266-remove-content-from-email-notifications
此行给出错误:
ActionView::Template::Error (undefined local variable or method `check_public' for #<#<Class:0xd1e5638>:0xb5081bf4>):
1: <% ispublic = check_public(@notification.post) %>
2: <% if ispublic == true %>
3: <%= comment_message(@notification.comment, :process_newlines => true) %>
4:
app/views/notifier/comment_on_post.markerb:1:in `_app_views_notifier_comment_on_post_markerb__51526760__628881328'
如何解决此问题?
我只是猜测,因为我必须更好地了解代码库才能真正理解这个问题。
我一目了然:
- 您正在邮件程序模板中调用
check_public
-
check_public
在app/helpers/notifier_helper.rb
中定义 - 引发错误,因为该方法未公开以进行呈现
所以我想在CommentOnPost
中包含NotifierHelper
可以解决问题。