Sha256: 83778402ff0e3957a1218de0a913b8861a40bd539f769919a7487c648ef7c7b7

Contents?: true

Size: 319 Bytes

Versions: 19

Compression:

Stored size: 319 Bytes

Contents

class Dorsale::Address < ::Dorsale::ApplicationRecord
  belongs_to :addressable, polymorphic: true, inverse_of: :address

  validates :addressable, presence: true

  def one_line
    zip_city = [zip, city].select(&:present?).join(' ')
    [street, street_bis, zip_city, country].select(&:present?).join(', ')
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
dorsale-3.8.1 app/models/dorsale/address.rb
dorsale-3.8.0 app/models/dorsale/address.rb
dorsale-3.7.8 app/models/dorsale/address.rb
dorsale-3.7.7 app/models/dorsale/address.rb
dorsale-3.7.6 app/models/dorsale/address.rb
dorsale-3.7.5 app/models/dorsale/address.rb
dorsale-3.7.4 app/models/dorsale/address.rb
dorsale-3.7.2 app/models/dorsale/address.rb
dorsale-3.7.1 app/models/dorsale/address.rb
dorsale-3.7.0 app/models/dorsale/address.rb
dorsale-3.6.1 app/models/dorsale/address.rb
dorsale-3.6.0 app/models/dorsale/address.rb
dorsale-3.5.2 app/models/dorsale/address.rb
dorsale-3.5.1 app/models/dorsale/address.rb
dorsale-3.5.0 app/models/dorsale/address.rb
dorsale-3.4.0 app/models/dorsale/address.rb
dorsale-3.3.0 app/models/dorsale/address.rb
dorsale-3.2.0 app/models/dorsale/address.rb
dorsale-3.1.7 app/models/dorsale/address.rb