Check for journal_user, then updated_by, and finally User.current when creating Journals
This commit is contained in:
parent
68526f6f2d
commit
bf13b0f409
|
@ -57,7 +57,7 @@ module Redmine::Acts::Journalized
|
|||
# Overrides the +journal_attributes+ method to include user information passed into the
|
||||
# parent object, by way of a +updated_by+ attr_accessor.
|
||||
def journal_attributes_with_user
|
||||
journal_attributes_without_user.merge(:user_id => updated_by.try(:id) || User.current.try(:id))
|
||||
journal_attributes_without_user.merge(:user_id => journal_user.try(:id) || updated_by.try(:id) || User.current.try(:id))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue