Class: TypedParams::Configuration
- Inherits:
-
Object
- Object
- TypedParams::Configuration
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/typed_params/configuration.rb
Instance Method Summary collapse
-
#ignore_nil_optionals ⇒ Object
ignore_nil_optionals defines how nil optionals are handled.
-
#key_transform ⇒ Object
key_transform defines the casing for parameter keys.
-
#path_transform ⇒ Object
path_transform defines the casing for parameter paths.
Instance Method Details
#ignore_nil_optionals ⇒ Object
ignore_nil_optionals defines how nil optionals are handled. When enabled, optional params that are nil will be dropped given the schema does not allow_nil. Essentially, they will be treated as if they weren’t provided.
12 |
# File 'lib/typed_params/configuration.rb', line 12 config_accessor(:ignore_nil_optionals) { false } |
#key_transform ⇒ Object
key_transform defines the casing for parameter keys.
One of:
- :underscore
- :camel
- :lower_camel
- :dash
- nil
38 |
# File 'lib/typed_params/configuration.rb', line 38 config_accessor(:key_transform) { nil } |
#path_transform ⇒ Object
path_transform defines the casing for parameter paths.
One of:
- :underscore
- :camel
- :lower_camel
- :dash
- nil
25 |
# File 'lib/typed_params/configuration.rb', line 25 config_accessor(:path_transform) { nil } |