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



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

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

#titleObject



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

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