Module: Rapid::Setting::NestedValidations

Defined in:
lib/rapid/setting/nested_validations.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rapid/setting/nested_validations.rb', line 6

def self.included base
  base.extend ClassMethods
  
  base.class_eval do
    class << self
      alias_method_chain :validates_exclusion_of, :nesting
      alias_method_chain :validates_format_of, :nesting
      alias_method_chain :validates_inclusion_of, :nesting
      alias_method_chain :validates_length_of, :nesting
      alias_method_chain :validates_presence_of, :nesting
      alias_method_chain :validates_size_of, :nesting
    end
  end
  
end