From 293a7495d52cea4d88817d5f692ea65d84e401a8 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 31 Aug 2015 15:01:08 +0200 Subject: [PATCH] Refactoring. --- app/models/setting.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/models/setting.rb b/app/models/setting.rb index c61869935..cc22c6855 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -137,12 +137,7 @@ reset config setting to default # convert state ot hash to be able to store it as store def state_check - - return if !state - return if state == false - - return if state.respond_to?('has_key?') && state.key?(:value) - + return if state.class == Hash && state.key?(:value) self.state = { value: state } end end