ArgumentError (wrong number of arguments (2 for 0)):

Can anyone tell me why I am getting this error using rails3 and

Completed 200 OK in 212313ms (Views: 2.8ms | ActiveRecord: 0.0ms)
Homepage Load (0.2ms) SELECT “homepages”.* FROM “homepages” WHERE
(“homepages”.“section” = ‘%Gar%’)

ArgumentError (wrong number of arguments (2 for 0)):

In my model I have:-
self.where(‘section <= ?’, “%#{search_item}%”)
self.where(:section => “%#{search_item}%”)

I am making an ajax call using a form_tag. “Gar” is being passed to

In my controller I have:-
def index

@homepages =[:search])
respond_to do |format|
  format.html # index.html.erb
  format.xml  { render :xml => @homepages }
  format.js {render :js => @homepages}

Just a guess on my part, but it looks as if you may want to produce a
LIKE condition in the resultant sql - if so, perhaps something like
(no pun intended ) this will work:

self.where(‘section LIKE ?’, “%#{search_item}%”)

Thanks Dennis you were right