From e63d29bc940874e91f9937d6c637e306b865f084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Sch=C3=B6lling?= Date: Mon, 17 Oct 2011 00:34:04 +0200 Subject: [PATCH] Fixed postgres issue --- app/models/share_visibility.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/share_visibility.rb b/app/models/share_visibility.rb index cfadc0047..6fd3c0712 100644 --- a/app/models/share_visibility.rb +++ b/app/models/share_visibility.rb @@ -14,7 +14,7 @@ class ShareVisibility < ActiveRecord::Base def self.batch_import(contact_ids, share) if postgres? contact_ids.each do |contact_id| - ShareVisibility.find_or_create_by_contact_id_and_shareable_id_and_shareable_type(contact_id, share.id, share.type) + ShareVisibility.find_or_create_by_contact_id_and_shareable_id_and_shareable_type(contact_id, share.id, share.class.base_class.to_s) end else new_share_visibilities_data = contact_ids.map do |contact_id|