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
This commit is contained in:
parent
740b54f55b
commit
aa127ebd4e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue