Module: WhyValidationsSuckIn96::ActiveRecord

Defined in:
lib/whyvalidationssuckin96/rails/active_record.rb

Overview

ActiveRecord

Defined Under Namespace

Modules: InstanceMethods

Constant Summary

RemovableInstanceMethods =
%w[invalid? validate_on_create validate_on_update validate errors]
RemovableClassMethods =
%w[validate validate_on_create validate_on_update validates_format_of validates_each
validates_inclusion_of validates_size_of validates_confirmation_of validates_exclusion_of
validates_uniqueness_of validates_associated validates_acceptance_of
validates_numericality_of validates_presence_of validates_length_of]

Class Method Summary

Class Method Details

+ (Object) included(klass_or_mod)



16
17
18
19
20
21
22
# File 'lib/whyvalidationssuckin96/rails/active_record.rb', line 16

def self.included(klass_or_mod)
  remove_active_record_validation_related_methods_from(klass_or_mod)
  klass_or_mod.instance_eval do
    include WhyValidationsSuckIn96::ValidationSupport
    include WhyValidationsSuckIn96::ActiveRecord::InstanceMethods
  end
end