Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0e3700364c
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.542 kb
module ActiveRecord::Associations::Builder
class HasOne < SingularAssociation #:nodoc:
def macro
:has_one
end
def valid_options
valid = super + [:order, :as]
valid += [:through, :source, :source_type] if options[:through]
valid
end
def constructable?
!options[:through]
end
def configure_dependency
super unless options[:through]
end
def valid_dependent_options
[:destroy, :delete, :nullify, :restrict_with_error, :restrict_with_exception]
end
end
end
Jump to Line
Something went wrong with that request. Please try again.