diff --git a/app/models/rubygem.rb b/app/models/rubygem.rb
index <HASH>..<HASH> 100644
--- a/app/models/rubygem.rb
+++ b/app/models/rubygem.rb
@@ -130,7 +130,8 @@ class Rubygem < ActiveRecord::Base
   end
 
   def owned_by?(user)
-    ownerships.find_by_user_id(user.id) if user
+    return false unless user
+    ownerships.exists?(:user_id => user.id)
   end
 
   def to_s
diff --git a/test/unit/rubygem_test.rb b/test/unit/rubygem_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/rubygem_test.rb
+++ b/test/unit/rubygem_test.rb
@@ -285,7 +285,7 @@ class RubygemTest < ActiveSupport::TestCase
       end
 
       should "be not owned if no user" do
-        assert !@rubygem.owned_by?(nil)
+        assert_equal false, @rubygem.owned_by?(nil)
         assert @rubygem.unowned?
       end
     end
Rubygem#owned_by? should return boolean