[#474] Changesets should use the author method for events

This will let them pick up the committer string if user is nil
This commit is contained in:
Eric Davis 2011-06-17 12:29:04 -07:00
parent 3d164f1da0
commit 1cf08ee300
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,7 @@ class Changeset < ActiveRecord::Base
:event_description => :long_comments,
:event_datetime => :committed_on,
:event_url => Proc.new {|o| {:controller => 'repositories', :action => 'revision', :id => o.repository.project, :rev => o.identifier}},
:event_author => Proc.new {|o| o.author},
:activity_timestamp => "#{table_name}.committed_on",
:activity_find_options => {:include => [:user, {:repository => :project}]}
acts_as_searchable :columns => 'comments',

View File

@ -173,10 +173,11 @@ module Redmine
end
end
options[:type] ||= self.name.underscore.dasherize # Make sure the name of the journalized model and not the name of the journal is used for events
{ :description => :notes, :author => :user }.reverse_merge options
options[:author] ||= :user
{ :description => :notes }.reverse_merge options
end
end
end
end
end
end