Class: Comment
- Defined in:
- app/models/comment.rb
Constant Summary
Constants included from StringLengthLimit
StringLengthLimit::STRING_LIMIT
Instance Attribute Summary collapse
-
#permalink ⇒ Object
Returns the value of attribute permalink.
-
#referrer ⇒ Object
Returns the value of attribute referrer.
Attributes included from ContentBase
#just_changed_published_status
Instance Method Summary collapse
- #default_text_filter ⇒ Object
- #feed_title ⇒ Object
- #interested_users ⇒ Object
- #notify_user_via_email(user) ⇒ Object
- #send_notifications ⇒ Object
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
Instance Attribute Details
#permalink ⇒ Object
Returns the value of attribute permalink.
10 11 12 |
# File 'app/models/comment.rb', line 10 def permalink @permalink end |
#referrer ⇒ Object
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_filter ⇒ Object
29 30 31 |
# File 'app/models/comment.rb', line 29 def default_text_filter TextFilter.find_or_default(blog.comment_text_filter) end |
#feed_title ⇒ Object
33 34 35 |
# File 'app/models/comment.rb', line 33 def feed_title "Comment on #{article.title} by #{}" end |
#interested_users ⇒ Object
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_notifications ⇒ Object
37 38 39 |
# File 'app/models/comment.rb', line 37 def send_notifications really_send_notifications end |