fix system stack error

* JournalMethods is included multiple times, which triggers the #included? callback on line 68 multiple times, with triggers #alias_method_chain on line 72 multiple times, which will end up in an infinite loop: #user_with_name= is the very same method as #user_without_name=
pull/1186/head
Martin Linkhorst 12 years ago
parent ffe37745c9
commit 31a20716c4
  1. 4
      lib/plugins/acts_as_journalized/lib/redmine/acts/journalized/users.rb

@ -41,7 +41,7 @@ module Redmine::Acts::Journalized
# responsible for the associated update to the parent.
module Users
def self.included(base) # :nodoc:
Journal.send(:include, JournalMethods)
Journal.send(:include, JournalMethods) unless Journal.include? JournalMethods
base.class_eval do
include InstanceMethods
@ -68,7 +68,7 @@ module Redmine::Acts::Journalized
def self.included(base) # :nodoc:
base.class_eval do
belongs_to :user
# attr_protected :user_id
# attr_protected :user_id
alias_method_chain :user=, :name
end
end

Loading…
Cancel
Save