Class: Comment
- Defined in:
- app/models/comment.rb
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, #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
Instance Attribute Details
#permalink ⇒ Object
Returns the value of attribute permalink.
8 9 10 |
# File 'app/models/comment.rb', line 8 def permalink @permalink end |
#referrer ⇒ Object
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_filter ⇒ Object
27 28 29 |
# File 'app/models/comment.rb', line 27 def default_text_filter TextFilter.find_or_default(blog.comment_text_filter) end |
#feed_title ⇒ Object
31 32 33 |
# File 'app/models/comment.rb', line 31 def feed_title "Comment on #{article.title} by #{}" end |
#interested_users ⇒ Object
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_notifications ⇒ Object
35 36 37 |
# File 'app/models/comment.rb', line 35 def send_notifications really_send_notifications end |