Module: WhyValidationsSuckIn96::ActiveRecord::ClassMethods
- Defined in:
- lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb
Overview
ClassMethods
Instance Method Summary
- - (Object) validate(*args) FIXME - this is a seedy hack and i blame the entire contents of active_record/autosave_association.rb for it being necessary.
Instance Method Details
- (Object) validate(*args)
FIXME - this is a seedy hack and i blame the entire contents of active_record/autosave_association.rb for it being necessary.
48 49 50 51 52 53 |
# File 'lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb', line 48 def validate(*args) return false unless WhyValidationsSuckIn96::ActiveRecord.warn_on_deprecation callstack = caller warn("This is a friendly message from WhyValidationsSuckIn96. \#{self.inspect} called 'validate' which is a\ndeprecated method. The arguments given were:\n\n\#{args.inspect} - \#{block_given? ? 'block given' : 'no block given'}\n\nand the caller was:\n\n\#{callstack.first}\n\nIf these warnings are coming from a call to 'add_autosave_association_callbacks', do not be alarmed, as\nWhyValidationsSuckIn96 has implemented its own versions of the necessary validation callbacks.\n\nThese warnings can be silenced by setting 'WhyValidationsSuckIn96::ActiveRecord.warn_on_deprecation' to false.\nYou will now be returned to your regularly scheduled programming.\n".gsub(/^\s{10}/, "")) false end |