Module: NotifierHelper
- Includes:
- PostsHelper
- Defined in:
- app/helpers/notifier_helper.rb
Instance Method Summary collapse
-
#comment_message(comment, opts = {}) ⇒ String
The formatted comment.
-
#post_message(post, opts = {}) ⇒ String
The formatted post.
Methods included from PostsHelper
#post_iframe_url, #post_page_title
Instance Method Details
#comment_message(comment, opts = {}) ⇒ String
Returns The formatted comment.
17 18 19 20 21 22 23 |
# File 'app/helpers/notifier_helper.rb', line 17 def (comment, opts={}) if comment.post.public? opts[:html] ? comment..markdownified_for_mail : comment..plain_text_without_markdown else I18n.translate "notifier.a_limited_post_comment" end end |
#post_message(post, opts = {}) ⇒ String
Returns The formatted post.
9 10 11 12 |
# File 'app/helpers/notifier_helper.rb', line 9 def (post, opts={}) rendered = opts[:html] ? post.&.markdownified_for_mail : post.&.plain_text_without_markdown rendered.presence || post_page_title(post) end |