Class: StoreModel::Configuration
- Inherits:
-
Object
- Object
- StoreModel::Configuration
- Defined in:
- lib/store_model/configuration.rb
Overview
StoreModel configuration.
Instance Attribute Summary collapse
-
#enable_parent_assignment ⇒ Boolean
Controls if parent tracking functionality is enabled.
-
#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 fields 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.
27 28 29 30 31 |
# File 'lib/store_model/configuration.rb', line 27 def initialize @serialize_unknown_attributes = true @enable_parent_assignment = true @serialize_enums_using_as_json = true end |
Instance Attribute Details
#enable_parent_assignment ⇒ Boolean
Controls if parent tracking functionality is enabled. Default: true
25 26 27 |
# File 'lib/store_model/configuration.rb', line 25 def enable_parent_assignment @enable_parent_assignment end |
#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 fields 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 |