Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion find_by_sql - ActiveRecord - Help please.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Colin Law  
View profile  
 More options Nov 8 2012, 3:09 am
From: Colin Law <clan...@googlemail.com>
Date: Thu, 8 Nov 2012 08:08:16 +0000
Local: Thurs, Nov 8 2012 3:08 am
Subject: Re: [Rails] Re: Re: find_by_sql - ActiveRecord - Help please.
On 7 November 2012 22:49, Jeff Lockyer <li...@ruby-forum.com> wrote:

> Hi Colin,

> 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.

>    if @my_names.size == 0

>                 render :update do |page|
>                 // Bunch of updating code to the displayed message to
> indicate no match found.
>                 page[:name].visualEffect('highlight')
>                 end

This end would appear to close the if statement.

>         else

I am surprised that does not cause a syntax error.
Also as others have pointed out the first element of the array could be nil.

Colin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.