Flowdock
method

define_autosave_validation_callbacks

Importance_0
v4.2.1 - Show latest stable - 0 notes - Class: ActiveRecord::AutosaveAssociation::ClassMethods
define_autosave_validation_callbacks(reflection) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/autosave_association.rb, line 208
        def define_autosave_validation_callbacks(reflection)
          validation_method = :"validate_associated_records_for_#{reflection.name}"
          if reflection.validate? && !method_defined?(validation_method)
            if reflection.collection?
              method = :validate_collection_association
            else
              method = :validate_single_association
            end

            define_non_cyclic_method(validation_method) { send(method, reflection) }
            validate validation_method
          end
        end
Register or log in to add new notes.