Class: Comment

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/lokka/comment.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.recent(count = 5) ⇒ Object



19
20
21
# File 'lib/lokka/comment.rb', line 19

def self.recent(count = 5)
  all(:limit => count, :order => [:created_at.desc])
end

Instance Method Details



23
24
25
# File 'lib/lokka/comment.rb', line 23

def link
  "#{self.entry.link}#comment-#{id}"
end