ActiveRecord error with Rails 2.1.0 using include statement

Discussion in 'Ruby' started by Sam Ginko, Aug 12, 2008.

  1. Sam Ginko

    Sam Ginko Guest

    I updated to Rails 2.1.0 and I'm getting an
    ActiveRecord::StatementInvalid error on an sql query that was working on
    the previous version. A simple call with and include getting data from 2
    tables. I'm not sure why this is happening now. Does anyone know what
    might cause this? Thanks in advance.

    @furnii_from_furnii = Furni.find :all, :include => "raider",
    :conditions => ""+Furni.conditions_by_like(@search)+" OR "
    +Raider.conditions_by_like(@search) + ""
    --
    Posted via http://www.ruby-forum.com/.
     
    Sam Ginko, Aug 12, 2008
    #1
    1. Advertising

  2. [Note: parts of this message were removed to make it a legal post.]

    rails forum

    On Mon, Aug 11, 2008 at 8:42 PM, Sam Ginko <> wrote:

    > I updated to Rails 2.1.0 and I'm getting an
    > ActiveRecord::StatementInvalid error on an sql query that was working on
    > the previous version. A simple call with and include getting data from 2
    > tables. I'm not sure why this is happening now. Does anyone know what
    > might cause this? Thanks in advance.
    >
    > @furnii_from_furnii = Furni.find :all, :include => "raider",
    > :conditions => ""+Furni.conditions_by_like(@search)+" OR "
    > +Raider.conditions_by_like(@search) + ""
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >
     
    reuben doetsch, Aug 12, 2008
    #2
    1. Advertising

  3. Sam Ginko

    Sam Ginko Guest

    Re: ActiveRecord error with Rails 2.1.0 using include statem

    reuben doetsch wrote:
    > rails forum


    oops. sorry. I realized it was the wrong place.
    --
    Posted via http://www.ruby-forum.com/.
     
    Sam Ginko, Aug 12, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Bogenberger
    Replies:
    3
    Views:
    1,001
    Andreas Bogenberger
    Feb 22, 2008
  2. Dmitry V. Sabanin

    [Rails] ActiveRecord modelling problem

    Dmitry V. Sabanin, Oct 7, 2004, in forum: Ruby
    Replies:
    3
    Views:
    141
    Dmitry V. Sabanin
    Oct 7, 2004
  3. Peter Kellner
    Replies:
    0
    Views:
    81
    Peter Kellner
    Aug 5, 2005
  4. Xeno Campanoli
    Replies:
    1
    Views:
    157
    Xeno Campanoli
    May 29, 2008
  5. Xeno Campanoli
    Replies:
    1
    Views:
    142
    Xeno Campanoli
    Jun 3, 2008
Loading...

Share This Page