Kedar Mhaswade wrote in post #981823:
> Or since only keys are needed, use each_key iterator.
>
> Also, I think ri should say that the "method" each "returns" the same
> Hash
> on which you called the method.
>
> -Kedar

I actually need both.

Hmm. This should output a string in view but it doesn't:

<% h = { "a" => 100, "b" => 200 } %>
<%= h.each {|key, value| puts "#{key} is #{value}" } %>

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

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to