Closed HenriqueMorato closed 4 years ago
describe_options
is only used with parse_options!
, it has no effect for the default data loading mechanism.
There is no built-in support for type coercion. If you want to enforce a string value, you can use on_load
hook:
on_load { self.client_id = client_it.to_s if client_id }
I know, this is not ideal. There is a plan to add something skip_auto_serialization
to config classes to disable any automatic type-casting; probably, will be a part of 2.1 release.
What did you do?
What did you expect to happen?
I was expecting the type to be string with full value
Environment
Ruby Version: 2.7
Framework Version (Rails, whatever): Rails 6.1.0.alpha
Anyway Config Version: 2.0.6
Am i doing something wrong or is it a bug?