Anybody have any idea why this is throwing an error:

@monkey = params[ :lab ][ :existing_lab_data_attributes ]
raise @monkey.to_yaml

--- !map:HashWithIndifferentAccess
"133": !map:HashWithIndifferentAccess
  unit_id: "2"
  lab_desc_id: "2"
  value: "500"
"145": !map:HashWithIndifferentAccess
  unit_id: "4"
  lab_desc_id: "3"
  value: ""
...

But when I try

@monkey.delete_if{ |x| x[ :value ].blank? }

I get the error:

Symbol as array index

Any ideas what's happening, and how to delete blanks in @monkey?

Many TIA,
Craig

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to