I want to create a array and then to insert values for each key (key should be the value from each). But seems to not working. This is my code.
@options = %w(Services Resources)
@images = []
@options.each do |value|
@images[value] << Media::Image.where(type: "Media::#{value.singularize}Image")
end