Sha256: 7868d5b89cdb754d042f993782f0710529752ebe44385d99acbc7775b9477e8b

Contents?: true

Size: 231 Bytes

Versions: 1

Compression:

Stored size: 231 Bytes

Contents

module Shopper
  class Address < ApplicationRecord
    belongs_to :country
    belongs_to :addressable, polymorphic: true

    validates :country, presence: true

    def to_s
      "#{type}: #{country}, #{city}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoppper-0.1.0 app/models/shopper/address.rb