Module: CommentsHelper

Defined in:
app/helpers/comments_helper.rb

Overview

Copyright © 2008-2013 Michael Dvorkin and contributors.

Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or www.opensource.org/licenses/mit-license.php


Instance Method Summary collapse

Instance Method Details

#notification_emails_configured?Boolean

Returns:

  • (Boolean)


14
15
16
17
# File 'app/helpers/comments_helper.rb', line 14

def notification_emails_configured?
  config = Setting.email_comment_replies || {}
  config[:server].present? && config[:user].present? && config[:password].present?
end

Generates a list of links for the subscribed users



9
10
11
12
# File 'app/helpers/comments_helper.rb', line 9

def subscribed_user_links(users)
  links = users.map {|user| link_to(user.full_name, user_path(user)) }
  links.join(", ").html_safe
end