[#474] aaj should use the Model's activity options for timestamp and author_key

Some models (Changeset) require custom options passed to
acts_as_activity_provider but acts_as_journalized wasn't accepting these
for :timestamp or :author_key
This commit is contained in:
Eric Davis 2011-06-17 12:39:07 -07:00
parent 1cf08ee300
commit 2f3657502f
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ module Redmine
def journalized_activity_hash(options)
options.tap do |h|
h[:type] ||= plural_name
h[:timestamp] = "#{journal_class.table_name}.created_at"
h[:author_key] = "#{journal_class.table_name}.user_id"
h[:timestamp] ||= "#{journal_class.table_name}.created_at"
h[:author_key] ||= "#{journal_class.table_name}.user_id"
h[:find_options] ||= {} # in case it is nil
h[:find_options] = {}.tap do |opts|