From: Paul Roche Date: 2010-11-14T04:33:33+09:00 Subject: Re: an each/block problem Hassan Schroeder wrote in post #961225: > On Sat, Nov 13, 2010 at 9:33 AM, Paul Roche > wrote: > >> Thanks for that. I am arranging to take 2 parameters... >> >> users = User.find(:all) >> users.each {|namex, user| nameb.call(namex.name) >> borrowed.call(user.books_borrowed) } > > I can't even begin to guess what you think should happen here -- what > in the heck is "namex"? :-) > > What I was implying was that your 'borrowed' proc take 2 arguments, > e.g. borrowed.call(user.name, user.books_borrowed) if you don't want > to pass the entire user object to it. Ah yes, I see whay you mean :) -- Posted via http://www.ruby-forum.com/.