From 85594cc9af153fd0a6be56e67d423f8322745fc0 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 1 Aug 2013 13:28:40 +0200 Subject: set checked flag --- app/controllers/voicemail_settings_controller.rb | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3