summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-25 09:29:40 -0500
committerPeter Kozak <spag@golwen.net>2013-02-25 09:29:40 -0500
commit0442cd19bc9383669b506185356227361a16e442 (patch)
treefd6c9f9220ace7a58bd723e9a7103834a695770c /app/models/ability.rb
parent5dcdeb1c1f8c53fd80a0443d61a289e583091416 (diff)
call_forwards - polymorphism added
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index d66577d..d886d53 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -129,7 +129,7 @@ class Ability
can :read, SipAccount, :sip_accountable_type => 'User', :sip_accountable_id => user.id
user.sip_accounts.each do |sip_account|
can :read, PhoneNumber, :id => sip_account.phone_number_ids
- can :manage, CallForward, :phone_number_id => sip_account.phone_number_ids
+ can :manage, CallForward, :call_forwardable_id => sip_account.phone_number_ids
can :manage, Ringtone, :ringtoneable_type => 'PhoneNumber', :ringtoneable_id => sip_account.phone_number_ids
can [:read, :destroy, :call] , CallHistory, :id => sip_account.call_history_ids
end
@@ -158,7 +158,7 @@ class Ability
# User can manage CallForwards of the PhoneNumbers of his
# own SipAccounts:
#
- can :manage, CallForward, :phone_number_id => user.phone_number_ids
+ can :manage, CallForward, :call_forwardable_id => user.phone_number_ids
# SoftkeyFunctions
#