summaryrefslogtreecommitdiffstats
path: root/app/models/member.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-08 15:12:02 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-08 15:12:02 +0000
commitaa127ebd4e8e89827dfe3fe397d87fae9c6d3209 (patch)
tree3b1ff1bd7695e99240fe3ec1c0affd6cd334e72b /app/models/member.rb
parent740b54f55b657e07305b3b9641bf83594f10b48f (diff)
downloadredmine-aa127ebd4e8e89827dfe3fe397d87fae9c6d3209.tar.gz
redmine-aa127ebd4e8e89827dfe3fe397d87fae9c6d3209.zip
Rails3: model: Member: add virtual attribute to prevent error
On Rails 3.0, test fails with following error. <pre> Error: test_validate(MemberTest): NoMethodError: undefined method `role' for #<Member:0x7f73caf8cd08> app/models/member.rb:87:in `validate_role' test/unit/member_test.rb:76:in `test_validate' </pre> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8127 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/member.rb')
-rw-r--r--app/models/member.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/member.rb b/app/models/member.rb
index f54981867..bddb54354 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -29,6 +29,12 @@ class Member < ActiveRecord::Base
before_destroy :set_issue_category_nil
after_destroy :unwatch_from_permission_change
+ def role
+ end
+
+ def role=
+ end
+
def name
self.user.name
end