Well before reading this Post let me tell you that author of this Idea is My friend "Michael Graff"
<% @hash.each do |key, value| %>
<%=h "#{key.to_s} #{value.to_s}" %>
<% end %>
You can iterate through hashes in many various ways, including sorting them:
<% @hash.keys.sort.each do |key| %>
<%=h "#{key.to_s} #{@hash[key]}" %>
<% end %>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment