Sha256: 33f49956efdf26b6c96b9d3d294b875a62d6b0eced8f07f6a19c0a89913c8f6b

Contents?: true

Size: 381 Bytes

Versions: 14

Compression:

Stored size: 381 Bytes

Contents

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 }
  }
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
refinerycms-0.9.6.34 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.33 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.32 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.31 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.30 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.29 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.28 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.27 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.26 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.25 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.24 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.23 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.22 vendor/plugins/will_paginate/test/fixtures/topic.rb
refinerycms-0.9.6.21 vendor/plugins/will_paginate/test/fixtures/topic.rb