back out r8124
r8124 shows ":roles can't be empty". git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8125 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d9699adce5
commit
15bb2fefa4
|
@ -84,7 +84,7 @@ class Member < ActiveRecord::Base
|
|||
protected
|
||||
|
||||
def validate_role
|
||||
errors.add_on_empty :roles if member_roles.empty? && roles.empty?
|
||||
errors.add_on_empty :role if member_roles.empty? && roles.empty?
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -74,7 +74,6 @@ class MemberTest < ActiveSupport::TestCase
|
|||
assert user.save
|
||||
member = Member.new(:project_id => 1, :user_id => user.id, :role_ids => [])
|
||||
assert !member.save
|
||||
assert_equal I18n.translate('activerecord.errors.messages.empty'), member.errors[:roles].to_s
|
||||
end
|
||||
|
||||
def test_validate_member_role
|
||||
|
|
Loading…
Reference in New Issue