class SDL::Association::BelongsTo

Indicates a one-to-one connection with another {Model}

Public Instance Methods

column_name() click to toggle source

The name of the column @return [Name]

# File lib/sdl/association.rb, line 61
def column_name
  Name.new("#{name}_id")
end
foreign_key?() click to toggle source

Should this field have a foreign key? @return [Boolean]

# File lib/sdl/association.rb, line 55
def foreign_key?
  options.fetch(:foreign_key, false)
end
type() click to toggle source

The type of field @return [Symbol]

# File lib/sdl/association.rb, line 49
def type
  :belongs_to
end