Fixes inherited_from attribute assignation (protected attribute).

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1375 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-04-28 16:02:06 +00:00
1 parent a10a54b20f
commit ed74c2a8a2
2 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -50,7 +50,9 @@ class Member < ActiveRecord::Base
if principal.is_a? Group
Member.delete_all "inherited_from = #{id}"
principal.users.each do |user|
Member.create! :project => project, :role => role, :principal => user, :inherited_from => id
inherited = Member.new :project => project, :role => role, :principal => user
inherited.inherited_from = id
inherited.save!
end
end
end