Sha256: 2e6530f5293bb65d3647b2025a8321a4121fb9b7b5d45f2643689de00db503dc

Contents?: true

Size: 1.11 KB

Versions: 30

Compression:

Stored size: 1.11 KB

Contents

module SellersHelper

  def display_address(seller)
    logger.info "Seller Data ===================="
    logger.info seller.inspect
    logger.info "Seller responds to address " + seller.respond_to?("address").to_s
    logger.info "Seller responds to address= " + seller.respond_to?("address=").to_s
    # logger.info seller.methods.sort.inspect
    logger.info "User Data ===================="
    logger.info seller.user.inspect
    logger.info "User responds to address " + seller.user.respond_to?("address").to_s
    logger.info "User responds to address= " + seller.user.respond_to?("address=").to_s
    # logger.info seller.user.methods.sort.inspect
    display_address = Array.new
    if seller.address
      display_address << seller.address.city if seller.address.city
      display_address << seller.address.state.abbreviation if seller.address.state && seller.address.state.abbreviation
      display_address << seller.address.zip_postal_code if seller.address.zip_postal_code
    end
    
    unless display_address.empty?
      "Location: " + display_address.join(", ")
    else
      "Location: unknown"
    end
  end
  
end

Version data entries

30 entries across 30 versions & 5 rubygems

Version Path
radiant-tags-extension-1.6.10 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
johnsbrn-has_many_polymorphs-2.13.1 test/integration/app/app/helpers/sellers_helper.rb
johnsbrn-has_many_polymorphs-2.13.3 test/integration/app/app/helpers/sellers_helper.rb
johnsbrn-has_many_polymorphs-2.13.4 test/integration/app/app/helpers/sellers_helper.rb
johnsbrn-has_many_polymorphs-2.13 test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.9 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.8 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.7 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.6 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.5 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.4 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.3 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.2 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.1 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.6.0 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
radiant-tags-extension-1.5.1 vendor/plugins/has_many_polymorphs/test/integration/app/app/helpers/sellers_helper.rb
has_many_polymorphs-2.13 test/integration/app/app/helpers/sellers_helper.rb
has_many_polymorphs-2.12 test/integration/app/app/helpers/sellers_helper.rb
has_many_polymorphs-2.11 test/integration/app/app/helpers/sellers_helper.rb
has_many_polymorphs-2.2 test/integration/app/app/helpers/sellers_helper.rb