[Ruby] Active Record and Array error

Ryan Davis ryand-ruby at zenspider.com
Thu Jun 21 20:15:36 PDT 2007


On Jun 21, 2007, at 16:52 , Neil Moomey wrote:

> Actually, the Owner1= was just added for debugging purposes.  I can  
> add any
> labels in my view if needed.  My final code in my Model looks like:
>
>   def owners
>     owners = [self.Owner1, self.Owner2, self.Owner3].reject { |o|  
> o.nil? or
> o.strip.empty? }
>   end

PLEASE if there is anything I teach the world it is STOP DEBUGGING BY  
PRINTING CRAP!

Write a test!




More information about the Ruby mailing list