Ruby on Rails Sunday, October 31, 2010

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}%")

> ArgumentError (wrong number of arguments (2 for 0)):
> ******************************************************************
> In my model I have:-
> self.where('section <= ?', "%#{search_item}%")
> or
> self.where(:section => "%#{search_item}%")

--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment