I often make use of this idiom to add something to an array in a hash of arrays:
@categories = {}
pagelist.each do |resource|
@categories[resource.tag] ||= []
@categories[resource.tag] << resource
end
.. is there a better way? Can the two @categories lines
be made into one?
Les