From: Rosina Bignall Date: 2006-07-23T01:27:22+09:00 Subject: Re: Showing part of an array.... Daniel Schierbeck wrote: > Rosina Bignall wrote: >> >> How do I limit the if to only working on the ' ...' part? > > puts "#{colors[0, 2].join(', ')}#{'...' if colors.length > 3}" That's what I thought, but this is actually being passed as an argument to be evaluated: @scaffold_columns = [ AjaxScaffold::ScaffoldColumn.new(self, { :name => "colors", :eval => "#{breed.colors[0, 2].collect{ |color| color.name}.join(', ')}#{'...' if breed.colors.length > 3}", :sortable => false } ) ] so I am just left with an blank column. Thanks for your help! Rosina -- Posted via http://www.ruby-forum.com/.