Wednesday, November 7, 2012

Re: [Rails] Re: Re: find_by_sql - ActiveRecord - Help please.

On Wed, Nov 7, 2012 at 2:49 PM, Jeff Lockyer <lists@ruby-forum.com> wrote:

> I don't think it is, in fact I know it isn't empty because the logic is
> inside a test for the return size of 0.

1.9.3 (main):0 > @stuff = []
=> []
1.9.3 (main):0 > @stuff << nil
=> [
[0] nil
]
1.9.3 (main):0 > @stuff[0]
=> nil
1.9.3 (main):0 > @stuff.size
=> 1
1.9.3 (main):0 >

You might want to try a different approach to validating the content
of your array :-)

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate