lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb
# FIXME - this is a seedy hack and i blame the entire contents of active_record/autosave_association.rb
# for it being necessary.
this is a seedy hack and i blame the entire contents of active_record/autosave_association.rb
for it being necessary.
this is a seedy hack and i blame the entire contents of active_record / autosave_association . rb for it being necessary .
def validate(*args)
        return false unless WhyValidationsSuckIn96::ActiveRecord.warn_on_deprecation
        callstack = caller
        warn(<<-EOW.gsub(/^\s{10}/, ""))
          This is a friendly message from WhyValidationsSuckIn96. #{self.inspect} called 'validate' which is a
          deprecated method. The arguments given were:
            #{args.inspect} - #{block_given? ? 'block given' : 'no block given'}
          and the caller was:
            #{callstack.first}
          If these warnings are coming from a call to 'add_autosave_association_callbacks', do not be alarmed, as
          WhyValidationsSuckIn96 has implemented its own versions of the necessary validation callbacks.
          These warnings can be silenced by setting 'WhyValidationsSuckIn96::ActiveRecord.warn_on_deprecation' to false.
          You will now be returned to your regularly scheduled programming.
        EOW
        false
      end
def validate ( * args ) return false unless WhyValidationsSuckIn96 :: ActiveRecord . warn_on_deprecation callstack = caller warn ( <<-EOW . gsub ( / ^ \s {10} / , "" ) ) 
          This is a friendly message from WhyValidationsSuckIn96.  #{ self . inspect }  called 'validate' which is a
          deprecated method. The arguments given were:
          
             #{ args . inspect }  -  #{ block_given? ? 'block given' : 'no block given' } 
            
          and the caller was:
          
             #{ callstack . first } 
          
          If these warnings are coming from a call to 'add_autosave_association_callbacks', do not be alarmed, as
          WhyValidationsSuckIn96 has implemented its own versions of the necessary validation callbacks.
            
          These warnings can be silenced by setting 'WhyValidationsSuckIn96::ActiveRecord.warn_on_deprecation' to false.
          You will now be returned to your regularly scheduled programming.
         EOW false end
FIXME - this is a seedy hack and i blame the entire contents of active_record/autosave_association.rb
for it being necessary.
FIXME - this is a seedy hack and i blame the entire contents of active_record / autosave_association . rb for it being necessary .
args
<not_specific>