summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-08-01 13:28:40 +0200
committerPeter Kozak <spag@golwen.net>2013-08-01 13:28:40 +0200
commit85594cc9af153fd0a6be56e67d423f8322745fc0 (patch)
treea9cb4a819a794c4daaa777cbb2941c261f0bebfe
parenta9300f046019deed8ebd72ce9b7fcd58d14ea5f3 (diff)
set checked flag
-rw-r--r--app/controllers/voicemail_settings_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/voicemail_settings_controller.rb b/app/controllers/voicemail_settings_controller.rb
index f270c3d..ca3ae86 100644
--- a/app/controllers/voicemail_settings_controller.rb
+++ b/app/controllers/voicemail_settings_controller.rb
@@ -42,6 +42,9 @@ class VoicemailSettingsController < ApplicationController
@voicemail_setting = @voicemail_account.voicemail_settings.find(params[:id])
@input_type = VoicemailSetting::VOICEMAIL_SETTINGS.fetch(@voicemail_setting.name,{}).fetch(:input, 'String')
@input_html = VoicemailSetting::VOICEMAIL_SETTINGS.fetch(@voicemail_setting.name,{}).fetch(:html, {})
+ if @input_type == :boolean && @voicemail_setting.value == 'true'
+ @input_html[:checked] = true
+ end
end
def update