File: reply.rb

package info (click to toggle)
ruby-will-paginate 3.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 444 kB
  • sloc: ruby: 2,940; sh: 50; makefile: 2
file content (8 lines) | stat: -rw-r--r-- 195 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
class Reply < ActiveRecord::Base
  scope :recent, lambda {
    where(['replies.created_at > ?', 15.minutes.ago]).
      order('replies.created_at DESC')
  }

  validates_presence_of :content
end