Yeah, forgot that ;) On 4/22/06, dblack / wobblini.net <dblack / wobblini.net> wrote: > Hi -- > > On Sun, 23 Apr 2006, 13 wrote: > > >> How about: > >> params: > >> currencies: <%= random_array.inspect %> > >> > >> or something like that. > >> > >> David > > > > Wow. Thanks, David. This is simple and straight forward, just what I need ! > > > > # somewhere outside fixture do the initialization of date array > > today = Date.today > > first = Date.new(today.year, today.mon, 1) > > last = (first >> 1) - 1 > > dates = (first..last).collect { |d| d.to_s } > > > > Then in *.yml > > > > params: > > <%= dates.rand_subset %> # rand_subset is from facets library > > I think you'll want to call .inspect; otherwise it will all be strung > together as a string. > > > Again, thanks ! > > Glad to help :-) > > > David > > -- > David A. Black (dblack / wobblini.net) > Ruby Power and Light, LLC (http://www.rubypowerandlight.com) > > "Ruby for Rails" PDF now on sale! http://www.manning.com/black > Paper version coming in early May! > >