Can I define a field in mongoid, but not persist it?
I need to_json to include the field, and using attr_accessor and after_initialize to calculate the value does not include it in the to_json result.
Can I define a field in mongoid, but not persist it? I need to_json
Share
Solved it by manipuating the JSON array itself, keeping most of the to_json power.