Hi,
could u guys please help me with this syntax:
SglineItem.find(:first, :conditions => {['sguser_id =?', params[:ad]], ['groceries_id =?', params[:bd]]})
Full Code:
Hi,
could u guys please help me with this syntax:
SglineItem.find(:first, :conditions => {['sguser_id =?', params[:ad]], ['groceries_id =?', params[:bd]]})
Full Code:
That's just wrong. Either conditions is an array eg
:conditions => ['foo=? and bar= ?', foo, bar]
or it's a hash of column names and values
:conditions => {:foo => foo, :bar =>bar}
But not some mish-mash of the two.
Fred
Thanks that worked
Hi, I would recommend referencing the Rails API when you have questions about the syntax and/or methods. Thus, it can be found at the following location:
Good luck,
-Conrad