Rodrigo Lueneberg wrote in post #1113851:
> I fixed it, but still get the error. Look:
>
> results = @selectedProductsArray.find {|k,v| v[:id] == 3 }
>
> NoMethodError in ServicesController#list
>
> undefined method `[]' for nil:NilClass

An array is a sequence of elements, not key-value pairs:

results = @selectedProductsArray.find {|e| e[:id] == 3 }

-- 
Posted via http://www.ruby-forum.com/.