From: eggie5 Date: 2007-08-25T13:45:07+09:00 Subject: Re: How can I make this if/else more succinct? On Aug 24, 8:01 pm, "Logan Capaldo" wrote: > On 8/24/07, eggie5 wrote:> Actually how can this be more succinct? > > > Video.find(:all).each do |video| > > ext = %w(_3gp _3g2 mp4).find { |m| video.send(m) == 1 > > }.to_s.sub(/\A_?(.+)\z/, '.\\1') > > expected.push "#{self.id}_#{video.id}#{ext}" > > end this works great, thanks.