I have this controller with a hash in the index
.
suggestions_controller.rb
class SuggestionsController < ApplicationController
def index
@mercs = {
'Proxy' => './mercs/proxy.png',
'Arty' => './mercs/arty.png',
'Aura' => './mercs/aura.png'
}
end
end
When I transfer it to my view,
index.html.erb
<div class="merc-list">
<%= @mercs.each do |merc, img| %>
<div class="merc">
</div>
<% end %>
</div>
my view displays the raw hash:
I also tried with a regular array (with no hash), and it displays the raw array in my view.