Sha256: 7d8e9e8487b29997b0724a6b2c57428deaaff1bfa350b6eab06b7fe47c9df416

Contents?: true

Size: 541 Bytes

Versions: 1

Compression:

Stored size: 541 Bytes

Contents

load File.join(Gem.loaded_specs['forgeos_commerce'].full_gem_path, 'app', 'models', 'user_address.rb')
UserAddress.class_eval do

  if Forgeos::CONFIG[:addresses] and mandatory_fields = Forgeos::CONFIG[:addresses]['mandatory_fields']
    validates *mandatory_fields, :presence => true
  end

  def to_s
     "#{I18n.t civility, :scope => [:civility, :label]} #{firstname} #{name} <br /> #{address} <br /> #{address_2} <br /> #{zip_code} #{city} <br />#{country.name.upcase}"
  end

  def designation
    self.class.to_s.underscore
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgeos_commerce_front-1.9.0 app/models/user_address.rb