Closed britishtea closed 9 years ago
This is expected. User.create(Sequel.ilike(:nickname, "britishtea"))
doesn't make sense. The find_or_create
rdoc states that it calls create
with the argument if the find
fails, and since create
would fail with such an argument (since it only takes a hash), I think that implies it shouldn't work.
I can understand what you want, but the find_or_create
API is not designed to handle that use case.
Using
find_or_create
with aSequel::SQL::BooleanExpression
(and I suspect anything other than aHash
) raises an error.The workaround is easy enough, so I'm not sure if this should just be stated in the documentation or actually be fixed.