[英]ActionView::Template::Error (undefined local variable or method `check_public'
I am working on an issue on diaspora* related to email notifications: 我正在处理与电子邮件通知相关的diaspora *问题:
Here is my Pull Request to diaspora*: https://github.com/diaspora/diaspora/pull/4508 这是我对散居国外*的拉取请求: https : //github.com/diaspora/diaspora/pull/4508
Link to my Github Repo: https://github.com/railsgirls-generator-app/diaspora/tree/4266-remove-content-from-email-notifications 链接到我的Github存储库: https : //github.com/railsgirls-generator-app/diaspora/tree/4266-remove-content-from-email-notifications
This line gives an error: 这行给出了一个错误:
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'
How can I resolve this issue? 我该如何解决这个问题?
i am just guessing, as i would have to know the codebase better to really understand the issue. 我只是在猜测,因为我必须更好地了解代码库才能真正理解该问题。
what i can see from a glance: 我一眼就能看到:
check_public
in a mailer template check_public
check_public
is defined in app/helpers/notifier_helper.rb
check_public
在app/helpers/notifier_helper.rb
定义 so i guess that including NotifierHelper
in CommentOnPost
would fix the problem. 所以我想在
CommentOnPost
中包含NotifierHelper
可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.