Class: Spree::Metafields::Json
- Inherits:
-
Spree::Metafield
- Object
- Spree::Metafield
- Spree::Metafields::Json
- Defined in:
- app/models/spree/metafields/json.rb
Instance Method Summary collapse
Instance Method Details
#csv_value ⇒ Object
12 13 14 |
# File 'app/models/spree/metafields/json.rb', line 12 def csv_value value.to_s end |
#serialize_value ⇒ Object
6 7 8 9 10 |
# File 'app/models/spree/metafields/json.rb', line 6 def serialize_value JSON.parse(value) rescue JSON::ParserError value end |