summaryrefslogtreecommitdiffstats
path: root/app/models/changeset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r--app/models/changeset.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index 9400df869..330338ab1 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -25,6 +25,11 @@ class Changeset < ActiveRecord::Base
:datetime => :committed_on,
:author => :committer,
:url => Proc.new {|o| {:controller => 'repositories', :action => 'revision', :id => o.repository.project_id, :rev => o.revision}}
+
+ acts_as_searchable :columns => 'comments',
+ :include => :repository,
+ :project_key => "#{Repository.table_name}.project_id",
+ :date_column => 'committed_on'
validates_presence_of :repository_id, :revision, :committed_on, :commit_date
validates_numericality_of :revision, :only_integer => true