class Triggerable::Conditions::Exists
Public Instance Methods
desc()
click to toggle source
# File lib/triggerable/conditions/field/exists.rb, line 13 def desc "#{@field} exists" end
scope()
click to toggle source
# File lib/triggerable/conditions/field/exists.rb, line 9 def scope "#{@field} IS #{'NOT ' if @value}NULL" end
true_for?(object)
click to toggle source
# File lib/triggerable/conditions/field/exists.rb, line 4 def true_for? object v = field_value(object) @value ? v.present? : v.blank? end