Remove dated config.gem
[gitorious:pkong23s-mainline.git] / vendor / plugins / ultrasphinx / test / integration / app / app / helpers / sellers_helper.rb
1 module SellersHelper
2
3   def display_address(seller)
4     logger.info "Seller Data ===================="
5     logger.info seller.inspect
6     logger.info "Seller responds to address " + seller.respond_to?("address").to_s
7     logger.info "Seller responds to address= " + seller.respond_to?("address=").to_s
8     # logger.info seller.methods.sort.inspect
9     logger.info "User Data ===================="
10     logger.info seller.user.inspect
11     logger.info "User responds to address " + seller.user.respond_to?("address").to_s
12     logger.info "User responds to address= " + seller.user.respond_to?("address=").to_s
13     # logger.info seller.user.methods.sort.inspect
14     display_address = Array.new
15     if seller.address
16       display_address << seller.address.city if seller.address.city
17       display_address << seller.address.state.abbreviation if seller.address.state && seller.address.state.abbreviation
18       display_address << seller.address.zip_postal_code if seller.address.zip_postal_code
19     end
20     
21     unless display_address.empty?
22       "Location: " + display_address.join(", ")
23     else
24       "Location: unknown"
25     end
26   end
27   
28 end