It looks like it works perfectly, except the object returned from my
named_scope is actually an Array, Shouldn't it just return the 1
object rather than an array with 1 item? Seems like a bug to me.
I'm afraid I have to disagree. There is nothing in the syntax of the
original post that indicates the results should be anything other than
an array. Granted an array of one object, but for consistency if you
changed the behavior of named_scope to be "smart" enough to look at
the SQL LIMIT then the ActiveRecord#find method should also be changed
to recognize that as well.
So no. I say leave named_scope as it is. I would expect named_scope to
return an array. Or add another explicit way to ask for a model just
like you do in find.