class Mv::Core::Validation::Presence
Public Class Methods
new(table_name, column_name, opts)
click to toggle source
Calls superclass method
Mv::Core::Validation::Base::new
# File lib/mv/core/validation/presence.rb, line 11 def initialize(table_name, column_name, opts) super(table_name, column_name, opts == true ? {} : opts) end
Protected Instance Methods
default_message()
click to toggle source
# File lib/mv/core/validation/presence.rb, line 17 def default_message "can't be blank" end
Private Instance Methods
nil_and_blank_can_not_be_both_allowed()
click to toggle source
# File lib/mv/core/validation/presence.rb, line 23 def nil_and_blank_can_not_be_both_allowed if allow_blank && allow_nil errors.add(:allow_blank, 'can not be allowed when nil is allowed') end end