Class: StoreModel::Configuration
- Inherits:
-
Object
- Object
- StoreModel::Configuration
- Defined in:
- lib/store_model/configuration.rb
Overview
StoreModel configuration.
Instance Attribute Summary collapse
-
#merge_array_errors ⇒ Boolean
Controls usage of MergeArrayErrorStrategy.
-
#merge_errors ⇒ Boolean
Controls usage of MergeErrorStrategy.
-
#serialize_enums_using_as_json ⇒ Boolean
Controls if the result of ‘as_json` will serialize enum fiels using `as_json`.
-
#serialize_unknown_attributes ⇒ Boolean
Controls if the result of ‘as_json` will contain the unknown attributes of the model.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 |
# File 'lib/store_model/configuration.rb', line 22 def initialize @serialize_unknown_attributes = true end |
Instance Attribute Details
#merge_array_errors ⇒ Boolean
Controls usage of MergeArrayErrorStrategy
12 13 14 |
# File 'lib/store_model/configuration.rb', line 12 def merge_array_errors @merge_array_errors end |
#merge_errors ⇒ Boolean
Controls usage of MergeErrorStrategy
8 9 10 |
# File 'lib/store_model/configuration.rb', line 8 def merge_errors @merge_errors end |
#serialize_enums_using_as_json ⇒ Boolean
Controls if the result of ‘as_json` will serialize enum fiels using `as_json`
20 21 22 |
# File 'lib/store_model/configuration.rb', line 20 def serialize_enums_using_as_json @serialize_enums_using_as_json end |
#serialize_unknown_attributes ⇒ Boolean
Controls if the result of ‘as_json` will contain the unknown attributes of the model
16 17 18 |
# File 'lib/store_model/configuration.rb', line 16 def serialize_unknown_attributes @serialize_unknown_attributes end |