Fixes boolean custom fields tags (broken by r1592) (#1640).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1668 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-07-14 17:29:06 +00:00
parent 6d3c0dab01
commit 025581bb28
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -25,6 +25,11 @@ class CustomValue < ActiveRecord::Base
end
end
# Returns true if the boolean custom value is true
def true?
self.value == '1'
end
protected
def validate
if value.blank?