Rails exists? Case insensitive

Model.exists?("lower(email) = ?", params[:email].downcase)

Returns error: ArgumentError (wrong number of arguments (2 for 0..1)):

Is it possible to do a exists? with a case insensitive match?


Source: ruby

Leave a Reply