From ab398555d6ba4bd1f2ebc3c70fcbbcc8a6ce3fc9 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer <raphael@joindiaspora.com> Date: Wed, 15 Jun 2011 18:55:20 -0700 Subject: [PATCH] Back to green in mysql --- lib/diaspora/user/querying.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb index d31001afae..6a7775b3f9 100644 --- a/lib/diaspora/user/querying.rb +++ b/lib/diaspora/user/querying.rb @@ -55,7 +55,7 @@ module Diaspora # @param row The row to get the id from. # @return The id of the database row passed in. def id_for row - @@id_method_for_row ||= if Post.connection.class == ActiveRecord::ConnectionAdapters::PostgreSQLAdapter + @@id_method_for_row ||= if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) && ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) [:[], "id"] else :first -- GitLab