Re: [Rails] Re: self.where('section = ?', '%:search_item%')
On 31 October 2010 20:05, MDM <don.mapp@gmail.com> 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 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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home