Module: NillyVanilly::Nillify::InstanceMethods
- Defined in:
- lib/nilly_vanilly/nillify.rb
Instance Method Summary collapse
-
#nillification ⇒ Object
Nillify attribute if it is a empty string.
Instance Method Details
#nillification ⇒ Object
Nillify attribute if it is a empty string
26 27 28 29 30 |
# File 'lib/nilly_vanilly/nillify.rb', line 26 def nillification for attribute in self.class.nillify_attributes self.send("#{attribute}=", nil) if self.send(attribute) == "" end end |