module BlankAttributes::Blankable::BlankableMethods

Public Class Methods

included(klass) click to toggle source
# File lib/blank_attributes/blankable.rb, line 18
def self.included(klass)
  klass.class_eval do
    before_validation :normalize_blank_attributes
    skip_callback :validate, :before, :normalize_blank_attributes, if: :skip_normalize_blank_atttributes?

    klass.class_eval do
      include BlankAttributes::Blankable::InstanceMethods
    end
  end
end