summaryrefslogtreecommitdiff
path: root/app/models/sip_account.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-07 02:36:38 -0500
committerPeter Kozak <spag@golwen.net>2013-03-07 02:36:38 -0500
commitc98072557273ff4383013f73621061ece34fc6d2 (patch)
treebef0469095415e2b2d794d66ae1946c66fe7c092 /app/models/sip_account.rb
parentbc3f8ae65689046f2b41123c7b392c4718d48dfd (diff)
call model table changed
Diffstat (limited to 'app/models/sip_account.rb')
-rw-r--r--app/models/sip_account.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb
index 1499d62..81b9c1c 100644
--- a/app/models/sip_account.rb
+++ b/app/models/sip_account.rb
@@ -38,7 +38,7 @@ class SipAccount < ActiveRecord::Base
has_many :ringtones, :as => :ringtoneable, :dependent => :destroy
- has_many :calls, :finder_sql => lambda { |s| "SELECT DISTINCT detailed_calls.* FROM detailed_calls WHERE presence_id LIKE '#{self.auth_name}@%' OR b_presence_id LIKE '#{self.auth_name}@%'" }
+ has_many :calls, :finder_sql => lambda { |s| "SELECT DISTINCT calls_active.* FROM calls_active WHERE sip_account_id = #{self.id} OR b_sip_account_id = #{self.id}" }
# Delegations:
#