ActiveRecord find starts with
Posted
by robintw
on Stack Overflow
See other posts from Stack Overflow
or by robintw
Published on 2008-10-30T19:05:48Z
Indexed on
2010/05/20
20:40 UTC
Read the original article
Hit count: 144
Really simple question - how do I do a search to find all records where the name starts with a certain string in ActiveRecord. I've seen all sorts of bits all over the internet where verbatim LIKE SQL clauses are used - but from what I've heard that isn't the 'correct' way of doing it.
Is there a 'proper' Rails way?
© Stack Overflow or respective owner