Hi,
I''m experimenting a strange behaviour when trying to evalute the id of
an
ActiveRecord instance. The code below produces weird values:
user = Customer.find(@session[:customer].id)
products = user.orders.collect do |order|
order.orderItems.collect do |item|
logger.info(''Product : '' + item.product.id.to_s)
item.product
end.uniq
end
products.each { |p| logger.info <http://logger.info> ''Products
'' + p.id.to_s}
The log inside the ''collect'' produces the expected result (ids
like 3, 4
or). But when I iterate on the resulting Array (products), my id values are
something like:
Products -608103678
Products -608105008
Products -608106288
Products -608112128
Products -608115738
Do anybody have an idea of what is happening?
Thanks a lot for any help,
Matt.
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails