From 07f1bd571480dd091d307c815c4942e9cde60180 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 25 Jul 2013 08:16:11 +0200 Subject: keys and type variables needed for call_history/phonebook display --- app/controllers/config_snom_controller.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index 9e5e18f..3beed2d 100644 --- a/app/controllers/config_snom_controller.rb +++ b/app/controllers/config_snom_controller.rb @@ -66,6 +66,9 @@ class ConfigSnomController < ApplicationController @sip_account = @phone.sip_accounts.where({ :id => params[:sip_account].to_i }).first end end + + @type = params[:type].blank? ? nil : params[:type].to_s.strip.downcase + @dialpad_keys = params[:keys].blank? ? nil : params[:keys].to_s.strip } def show @@ -272,14 +275,6 @@ class ConfigSnomController < ApplicationController end end - if ! params[:type].blank? - @type = params[:type].to_s.strip.downcase - end - - if ! params[:keys].blank? - @dialpad_keys = params[:keys].to_s.strip - end - if ! @phone render( :status => 404, -- cgit v1.2.3