From 55d0643617764d025b545806c89dc936af5c6509 Mon Sep 17 00:00:00 2001 From: Cymen Vig Date: Tue, 16 Mar 2021 17:50:39 -0400 Subject: [PATCH] make Contract.signed_by scope PostgreSQL-compatible looks like https://github.com/lml/fine_print/pull/22 returned --- app/models/fine_print/contract.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/fine_print/contract.rb b/app/models/fine_print/contract.rb index 316abb4..a49c287 100644 --- a/app/models/fine_print/contract.rb +++ b/app/models/fine_print/contract.rb @@ -24,7 +24,7 @@ class Contract < ActiveRecord::Base joins(:same_name).group(:id).having(fpc[:version].eq(sn[:version].maximum)) end scope :signed_by, ->(user) do - joins(:signatures).where(signatures: { user_id: user.id, user_type: class_name_for(user) }) + joins(:signatures).where(fine_print_signatures: { user_id: user.id, user_type: class_name_for(user) }) end def is_published?