summaryrefslogtreecommitdiffstats
path: root/app/models/custom_value.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/custom_value.rb')
-rw-r--r--app/models/custom_value.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/custom_value.rb b/app/models/custom_value.rb
index 98ce6b168..1d453baf0 100644
--- a/app/models/custom_value.rb
+++ b/app/models/custom_value.rb
@@ -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?