class ActiveRecord::Associations::Builder::HasOne

:nodoc:

def self.add_destroy_callbacks(model, reflection)

def self.add_destroy_callbacks(model, reflection)
  super unless reflection.options[:through]
end

def self.valid_dependent_options

def self.valid_dependent_options
  [:destroy, :delete, :nullify, :restrict_with_error, :restrict_with_exception]
end

def macro

:nodoc:
def macro
  :has_one
end

def valid_options

def valid_options
  valid = super + [:as, :foreign_type]
  valid += [:through, :source, :source_type] if options[:through]
  valid
end