Sha256: ac4dadcfb6bddc1c8362722ef098175b862b0e5c7783c78e6d1ef167fcf8af2a
Contents?: true
Size: 598 Bytes
Versions: 4
Compression:
Stored size: 598 Bytes
Contents
if defined? DataMapper::Resource class Address include DataMapper::Resource property :id, Serial belongs_to :user property :street, String property :city, String property :postcode, String property :created_at, DateTime property :updated_at, DateTime end elsif defined? Sequel::Model class Address < Sequel::Model # although this is one_to_one, according to Sequel docs, # the model containing the foreign key should have many_to_one # and the other model should have one_to_one many_to_one :user end else class Address < ActiveRecord::Base belongs_to :user end end
Version data entries
4 entries across 4 versions & 2 rubygems