Sha256: 36db96028244a459dcf3ebae6a97f2ca1b3d6e3ce81a5e90bbca0975bae9491e

Contents?: true

Size: 296 Bytes

Versions: 10

Compression:

Stored size: 296 Bytes

Contents

module Dorsale
  class Address < ActiveRecord::Base
    validates_presence_of :city
    belongs_to :addressable, polymorphic: true

    def one_line
      result = [street, street_bis, [zip, city].delete_if {|e| e.blank?}.join(' '), country].delete_if {|e| e.blank?}.join(', ')
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dorsale-1.1.4 app/models/dorsale/address.rb
dorsale-1.1.3 app/models/dorsale/address.rb
dorsale-1.1.2 app/models/dorsale/address.rb
dorsale-1.1.1 app/models/dorsale/address.rb
dorsale-1.1.0 app/models/dorsale/address.rb
dorsale-1.0.4 app/models/dorsale/address.rb
dorsale-1.0.3 app/models/dorsale/address.rb
dorsale-1.0.2 app/models/dorsale/address.rb
dorsale-1.0.1 app/models/dorsale/address.rb
dorsale-1.0.0 app/models/dorsale/address.rb