Class: Goldencobra::Comment

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/goldencobra/comment.rb

Instance Method Summary collapse

Instance Method Details

#commentator_titleObject



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

def commentator_title
  if self.commentator.respond_to?(:title)
    self.commentator.title
  end
end

#titleObject



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

def title
  [self.article.title,self.content[0..20]].join(" - ")
end