From 3cdcb5ca02a94b2b342c30903a27d47d35d46e55 Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 17 Feb 2009 12:47:49 +0100 Subject: added will_paginate plugin --- vendor/plugins/will_paginate/test/fixtures/topic.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 vendor/plugins/will_paginate/test/fixtures/topic.rb (limited to 'vendor/plugins/will_paginate/test/fixtures/topic.rb') diff --git a/vendor/plugins/will_paginate/test/fixtures/topic.rb b/vendor/plugins/will_paginate/test/fixtures/topic.rb new file mode 100644 index 00000000..2c2ce722 --- /dev/null +++ b/vendor/plugins/will_paginate/test/fixtures/topic.rb @@ -0,0 +1,10 @@ +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 -- cgit v1.3