Hi, I am a noobie. I just want to know what is the standard or most effective way of doing this
I have two functions def display_price(grocery,batch) grocery_price = grocery.send(batch).price if grocery_price number_to_currency(grocery_price) else "NA" end end def loop(func,matrix) matrix.each { |matrix| display_price(@grocery,matrix) } end the "func argument" in the loop function is suppose to be display_price but how do i put it in if the "batch" is the thing that I want to be looped through? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---