Class: Roachclip::Validations::ValidatesPresenceOf
- Inherits:
-
Validatable::ValidationBase
- Object
- Validatable::ValidationBase
- Roachclip::Validations::ValidatesPresenceOf
- Defined in:
- lib/roachclip/validations.rb
Instance Method Summary collapse
Instance Method Details
#message(instance) ⇒ Object
8 9 10 |
# File 'lib/roachclip/validations.rb', line 8 def (instance) super || 'is required' end |
#valid?(instance) ⇒ Boolean
4 5 6 |
# File 'lib/roachclip/validations.rb', line 4 def valid?(instance) instance.send("#{attribute}?") end |