def has_one(*args, &extension)
      options = args.extract_options! || {}
      if VALID_DEPENDENTS.include?(options[:dependent].try(:to_sym))
        reflection = if active_record_4?
          association_id, scope = *args
          restrict_create_reflection(:has_one, association_id, scope || {}, options, self)
        else
          association_id = args[0]
          create_reflection(:has_one, association_id, options, self)
        end
        add_dependency_callback!(reflection, options)
      end
      args << options
      super(*args, &extension)
    end
def has_one(*args, &extension)
      options = args.extract_options! || {}
      if VALID_DEPENDENTS.include?(options[:dependent].try(:to_sym))
        reflection = if active_record_4?
          association_id, scope = *args
          restrict_create_reflection(:has_one, association_id, scope || {}, options, self)
        else
          association_id = args[0]
          create_reflection(:has_one, association_id, options, self)
        end
        add_dependency_callback!(reflection, options)
      end
      args << options
      super(*args, &extension)
    end
We should be aliasing configure_dependency_for_has_many but that method
 is private so we can't. We alias has_many instead trying to be as fair
 as we can to the original behaviour.