2011-01-13 59 views
0
(rdb:569) @errors 
#<ActiveRecord::Errors:0x104596758 @errors={}, @base=#<Deal id: nil, organization_id: nil, deal: "Free", value: nil, what: "this deal", description: "friday on sept. this deal", image_file_name: nil, image_content_type: nil, image_file_size: nil, image_updated_at: nil, created_at: nil, updated_at: nil, deal_image_file_name: nil, deal_image_content_type: nil, deal_image_file_size: nil, deal_image_uploaded_at: nil>> 

例如,我將如何在@errors中調用description如何訪問此散列中的參數?

回答

2

@ errors.instance_variable_get(「@ base」)。description