Class: Comment

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

Constant Summary

Constants included from StringLengthLimit

StringLengthLimit::STRING_LIMIT

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, allowed_tags, #change_state!, #classify, #classify_content, #confirm_classification, #confirm_classification!, #correct_url, #feedback_allowed, #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, included, #really_send_notifications, #send_notification_to_user, #text_filter

Methods included from PublifyGuid

#create_guid

Instance Attribute Details

Returns the value of attribute permalink.



10
11
12
# File 'app/models/comment.rb', line 10

def permalink
  @permalink
end

#referrerObject

Returns the value of attribute referrer.



10
11
12
# File 'app/models/comment.rb', line 10

def referrer
  @referrer
end

Instance Method Details

#default_text_filterObject



29
30
31
# File 'app/models/comment.rb', line 29

def default_text_filter
  TextFilter.find_or_default(blog.comment_text_filter)
end

#feed_titleObject



33
34
35
# File 'app/models/comment.rb', line 33

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

#interested_usersObject



25
26
27
# File 'app/models/comment.rb', line 25

def interested_users
  User.where(notify_on_comments: true)
end

#notify_user_via_email(user) ⇒ Object



21
22
23
# File 'app/models/comment.rb', line 21

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

#send_notificationsObject



37
38
39
# File 'app/models/comment.rb', line 37

def send_notifications
  really_send_notifications
end