Class: Comment

Inherits:
Feedback
  • Object
show all
Defined in:
app/models/comment.rb

Instance Attribute Summary collapse

Attributes included from ContentBase

#just_changed_published_status

Instance Method Summary collapse

Methods inherited from Feedback

#akismet_is_spam?, #akismet_options, #article_allows_this_feedback, #blog_allows_feedback?, #change_state!, #classify, #classify_content, #confirm_classification, #confirm_classification!, #correct_url, #feedback_not_closed, #html_postprocess, paginated, #parent, #permalink_url, #published?, #report_as_ham, #report_as_spam, #sp_is_spam?, #spam_fields, #spammy?, #status_confirmed?

Methods included from ContentBase

#excerpt_text, #generate_html, #html, #html_map, #html_postprocess, #html_preprocess, included, #really_send_notifications, #send_notification_to_user

Methods included from PublifyGuid

#create_guid

Instance Attribute Details

Returns the value of attribute permalink.



8
9
10
# File 'app/models/comment.rb', line 8

def permalink
  @permalink
end

#referrerObject

Returns the value of attribute referrer.



8
9
10
# File 'app/models/comment.rb', line 8

def referrer
  @referrer
end

Instance Method Details

#default_text_filterObject



27
28
29
# File 'app/models/comment.rb', line 27

def default_text_filter
  TextFilter.find_or_default(blog.comment_text_filter)
end

#feed_titleObject



31
32
33
# File 'app/models/comment.rb', line 31

def feed_title
  "Comment on #{article.title} by #{author}"
end

#interested_usersObject



23
24
25
# File 'app/models/comment.rb', line 23

def interested_users
  User.where(notify_on_comments: true)
end

#notify_user_via_email(user) ⇒ Object



19
20
21
# File 'app/models/comment.rb', line 19

def notify_user_via_email(user)
  EmailNotify.send_comment(self, user) if user.notify_via_email?
end

#send_notificationsObject



35
36
37
# File 'app/models/comment.rb', line 35

def send_notifications
  really_send_notifications
end