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:
Toshi MARUYAMA 2011-12-08 13:37:27 +00:00
parent d9699adce5
commit 15bb2fefa4
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -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