method

define_restrict_dependency_method

rails latest stable - Class: ActiveRecord::Associations::Builder::HasOne

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

define_restrict_dependency_method()
private

No documentation available.

# File activerecord/lib/active_record/associations/builder/has_one.rb, line 55
      def define_restrict_dependency_method
        name = self.name
        mixin.redefine_method(dependency_method_name) do
          raise ActiveRecord::DeleteRestrictionError.new(name) unless send(name).nil?
        end
      end