On 31 October 2010 20:05, MDM <[email protected]> wrote:
> Both of these works which do you think is best.
>     self.where('section LIKE ?', "%#{search_item}%")
>     self.where('section LIKE ?', '%'+search_item+'%')

personally, I prefer the syntax of the first method; it seems more "Ruby".

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to