mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 07:34:08 +01:00
12 lines
432 B
Ruby
12 lines
432 B
Ruby
class Topic < ActiveRecord::Base
|
|
has_many :replies, :dependent => :destroy, :order => 'replies.created_at DESC'
|
|
belongs_to :project
|
|
|
|
named_scope :mentions_activerecord, :conditions => ['topics.title LIKE ?', '%ActiveRecord%']
|
|
|
|
named_scope :with_replies_starting_with, lambda { |text|
|
|
{ :conditions => "replies.content LIKE '#{text}%' ", :include => :replies }
|
|
}
|
|
|
|
def self.paginate_by_definition_in_class; end
|
|
end
|