2011-09-23 4 views
1

이것은 몽고 이드 오브젝트이지만 모든 오브젝트에 적용됩니다. 내가 키에 @product를 분할하려면 어떻게, 값 쌍 @product은 다음과 같습니다 때개체의 모든 값을 어떻게 표시합니까?

#<Product _id: 4e7cd178e66de72d70000010, _type: nil, 
created_at: 2011-09-23 18:35:36 UTC, 
updated_at: 2011-09-23 18:35:36 UTC, brand: "crystalrock", 
name: "Crazy Fool Specialty Tank", retailer: nil, model: nil, 
sku: nil store: {"id"=>"36033", "name"=>"Ed Hardy"}, 
product_id: "684", sku_number: "D9WAFDCR", category_primary: "Tanks"> 

나는 그것이 개체의 방법이 될 것이라고 생각하지만 작품을 볼 수 없습니다.

답변

1

@ product.attributes는 작동하는 몽고 이드 메소드입니다.

관련 문제