lib/captain_config/service.rb in captain_config-1.0.0 vs lib/captain_config/service.rb in captain_config-1.1.0
- old
+ new
@@ -38,10 +38,10 @@
assert_loaded!
configs.value.fetch key
end
- def set(key, new_value, coerce: false)
+ def set(key, new_value, coerce: true)
assert_loaded!
record = configured_entries.fetch(key).model.find_or_create_by!(key: key)
record.value = coerce ? record.class.coerce(new_value) : new_value
record.save!