def set_features=(features_json)
      # return unless features_json.class == Hash
      features_json.keys.each do |feature_key|
        # TODO - create feature_key if its missing
        if features_json[feature_key] == "true" || features_json[feature_key] == true
          features.find_or_create_by( feature_key: feature_key)
        else
          features.where( feature_key: feature_key).delete_all
        end
      end
    end
def set_features=(features_json)
      # return unless features_json.class == Hash
      features_json.keys.each do |feature_key|
        # TODO - create feature_key if its missing
        if features_json[feature_key] == "true" || features_json[feature_key] == true
          features.find_or_create_by( feature_key: feature_key)
        else
          features.where( feature_key: feature_key).delete_all
        end
      end
    end
Setter- called by update_extras in properties controller
 expects a hash with keys like "cl.casafactory.fieldLabels.extras.alarma"
 each with a value of true or false