[LRUG] Baffled by inconsistent behaviour of Rails find_by_* method

Sam Oliver sam at samoliver.com
Wed Aug 24 04:32:19 PDT 2011


On Wed, Aug 24, 2011 at 12:09 PM, Mark Woods <mwoods at online.ie> wrote:

> > There are indeed those three different specification codes in the
> database,
> > and each of them begins with "4400", but why does the same method find
> only
> > one when run from the console?
>
> I'm scared... is Exammodule.find_all_by_specificationcode really
> finding partial matches when given a string argument? If so, what
> query is activerecord generating?


In MySQL's world "4400/3H" == 4400

Yet another reason to ditch mysql.

Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20110824/65800b3c/attachment-0003.html>


More information about the Chat mailing list