Class: Trackback

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

Overview

Legacy class to support old feedback sent as trackbacks.

Constant Summary

Constants included from StringLengthLimit

StringLengthLimit::STRING_LIMIT

Instance Attribute Summary

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, #send_notifications, #sp_is_spam?, #spam_fields, #spammy?, #status_confirmed?

Methods included from ContentBase

#default_text_filter, #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 Method Details

#bodyObject



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

def body
  excerpt
end

#body=(newval) ⇒ Object



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

def body=(newval)
  self.excerpt = newval
end

#feed_titleObject



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

def feed_title
  "Trackback from #{blog_name}: #{title} on #{article.title}"
end

#originatorObject



17
18
19
# File 'app/models/trackback.rb', line 17

def originator
  blog_name
end

#process_trackbackObject



10
11
12
13
14
15
# File 'app/models/trackback.rb', line 10

def process_trackback
  if excerpt.length >= 251
    # this limits excerpt to 250 chars, including the trailing "..."
    self.excerpt = excerpt[0..246] << "..."
  end
end