summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-27 17:28:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-27 17:28:22 +0000
commita96421019f3a813b93798e4ec8099edd09f8a661 (patch)
tree102827aea563063b29ae21800bfff88fb16550f9 /app/models/news.rb
parentd723bea502faedb218f929b40849935d61c577e2 (diff)
downloadredmine-a96421019f3a813b93798e4ec8099edd09f8a661.tar.gz
redmine-a96421019f3a813b93798e4ec8099edd09f8a661.zip
Search engines now supports pagination.
Results are sorted in reverse chronological order. git-svn-id: http://redmine.rubyforge.org/svn/trunk@766 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r--app/models/news.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/news.rb b/app/models/news.rb
index 4352363d9..3d8c4d661 100644
--- a/app/models/news.rb
+++ b/app/models/news.rb
@@ -24,6 +24,7 @@ class News < ActiveRecord::Base
validates_length_of :title, :maximum => 60
validates_length_of :summary, :maximum => 255
+ acts_as_searchable :columns => ['title', 'description']
acts_as_event :url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.id}}
# returns latest news for projects visible by user