DmitryTsepelev / store_model

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

JSON deserializing empty string, leads to nil error #160

Closed jcdennen closed 1 year ago

jcdennen commented 1 year 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