From: Mauricio Alcayaga Date: 2011-09-03T22:07:36+09:00 Subject: Re: help on find over find Ryan Davis wrote in post #1019657: > On Sep 1, 2011, at 11:31 , Mauricio Alcayaga wrote: > >> @activityPeriods = coleccion.map{ |x| [x.VARIABLEFIELDNAME.year, >> x.VARIABLEFIELDNAME.month] }.uniq > > I'm not sure I entirely understand your question... but I think you want > to look at Object.send. thank you Ryan anyway, a friend of mine, cristian (zany) zaninovic, gently answer me, he spoke as: hey bastard, you should use : paramA = 'year' paramB = 'month' dateFieldName = 'name_of_da_field' @activityPeriods = coleccion.map{ |x| [eval("x.#{dateFieldName}.#{paramA}"), eval("x.#{dateFieldName}.#{paramB}")] }.uniq I didn't try already, but think it will work -- Posted via http://www.ruby-forum.com/.