I have postgresql database, as column datatype I'm using json and inside hash I have boolean type. If I use array it stores '0' or '1', but not a boolean, if I use hash {false: "Hide", true: "Show"} and before callback self.content['value'] = @value == 'true' if ['true', 'false'].include?(@value) it saves correctly, but shows as it is null.