diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-15 21:47:26 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-15 21:47:26 +0100 |
commit | 96fc4789d9991548b9fd1144f185da1f3464f156 (patch) | |
tree | 63a96aafcf4f3b9c57355261a35e728c36c064cd /app/views/tenants/_sip_accounts_and_phones.html.haml | |
parent | 6b7cbac8a2a274c1839e8ea6aa293d0e6e49d370 (diff) |
Fixed caching bugs.
Diffstat (limited to 'app/views/tenants/_sip_accounts_and_phones.html.haml')
-rw-r--r-- | app/views/tenants/_sip_accounts_and_phones.html.haml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/tenants/_sip_accounts_and_phones.html.haml b/app/views/tenants/_sip_accounts_and_phones.html.haml index 618236f..c698fef 100644 --- a/app/views/tenants/_sip_accounts_and_phones.html.haml +++ b/app/views/tenants/_sip_accounts_and_phones.html.haml @@ -12,7 +12,7 @@ - if tenant.sip_accounts.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = link_to tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(tenant) - else - - cache([I18n.locale, tenant, tenant.sip_accounts, PhoneNumber.where(:phone_numberable_type => 'SipAccount').where(:id => tenant.sip_account_ids)]) do + - cache(['tenant_show_tenant_sip_accounts',I18n.locale, tenant, tenant.sip_accounts, PhoneNumber.where(:phone_numberable_type => 'SipAccount').where(:id => tenant.sip_account_ids)]) do - tenant.sip_accounts.each do |sip_account| = succeed ', ' do =link_to "#{sip_account.caller_name}", tenant_sip_account_path(tenant,sip_account) @@ -44,7 +44,7 @@ - if tenant.phones.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = link_to tenant.phones.count.to_s, tenant_phones_path(tenant) - else - - cache([I18n.locale, tenant, tenant.phones]) do + - cache(['tenant_show_tenant_phones', I18n.locale, tenant, tenant.phones]) do - tenant.phones.each do |phone| = succeed ', ' do = link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", tenant_phone_path(tenant, phone) |