DmitryTsepelev / store_model

Work with JSON-backed attributes as ActiveRecord-ish models
MIT License
1.04k stars 85 forks source link

JSON deserializing empty string, leads to nil error #160

Closed jcdennen closed 10 months ago

jcdennen commented 10 months ago

The problematic code: https://github.com/DmitryTsepelev/store_model/blob/9a502a3fcee1dfeb31be12a0a20c416dc1afc8d4/lib/store_model/types/one.rb#L66-L67

The issue:

Proposed Solution:

I'm happy to cut a PR for this once the issue is acknowledged and proposed solution agreed upon