Improved state_check().
This commit is contained in:
parent
272a476b09
commit
53a90b6d5c
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ class Setting < ApplicationModel
|
|||
end
|
||||
def state_check
|
||||
if self.state
|
||||
if !self.state.has_key?(:value)
|
||||
if !self.state.respond_to?('has_key?') || !self.state.has_key?(:value)
|
||||
self.state = { :value => self.state }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue