Commit 6f809b82 authored by Felix Schäfer's avatar Felix Schäfer

Replace a call to changes with its code from AR::Dirty. #422

acts_as_journalized called changes as per ActiveRecord::Dirty 
the journalized model Changeset :has_many changes though, which 
made the call return a list of associated objects instead of the 
intended list of changed attributes. Replaced changes with the code
from AR::Dirty to work around that.
parent 6015913f
......@@ -88,7 +88,7 @@ module Redmine::Acts::Journalized
# creation. Incremental changes are reset when the record is saved because they represent
# a subset of the dirty attribute changes, which are reset upon save.
def incremental_journal_changes
changed.inject({}) { |h, attr| h[attr] = attribute_change(attr); h }.slice(*journaled_columns)
# Simply resets the cumulative changes after journal creation.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment