Class: ActiveRecord::Has::SparseAttributes::StorageConfig
- Inherits:
-
Object
- Object
- ActiveRecord::Has::SparseAttributes::StorageConfig
- Defined in:
- lib/active_record/has/sparse_attributes/storage.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#model_class ⇒ Object
Returns the value of attribute model_class.
-
#serialize_values ⇒ Object
Returns the value of attribute serialize_values.
Instance Method Summary collapse
-
#initialize(klass, options = {}) ⇒ StorageConfig
constructor
A new instance of StorageConfig.
Constructor Details
#initialize(klass, options = {}) ⇒ StorageConfig
Returns a new instance of StorageConfig.
9 10 11 12 |
# File 'lib/active_record/has/sparse_attributes/storage.rb', line 9 def initialize(klass, = {}) @model_class = klass @serialize_values = [:serialize] || false end |
Instance Attribute Details
#model_class ⇒ Object
Returns the value of attribute model_class.
6 7 8 |
# File 'lib/active_record/has/sparse_attributes/storage.rb', line 6 def model_class @model_class end |
#serialize_values ⇒ Object
Returns the value of attribute serialize_values.
7 8 9 |
# File 'lib/active_record/has/sparse_attributes/storage.rb', line 7 def serialize_values @serialize_values end |