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