s.ross
s.ross
I'd like to understand the use case for this a bit better. The typical usage is to deserialize on launch and then serialize on change. So the second deserialization would...
Can you get a PR together for this?
This is a Ruby thing. Once you assign an array, I believe it will be a different object. Otherwise, you'll have to copy the array (dup). You can test this:...
I wonder if a more general solution might be to have the default take a value or a proc. So something like this would work: ``` columns test: { type:...
I'm inclined to agree with @aceofspades on this. ActiveRecord doesn't really address mutable defaults (for lack of a better term). They defer it to after hooks. A stubby proc, lambda...
I pushed a fix for this in the proc_defaults branch (https://github.com/sxross/MotionModel/tree/proc_defaults). Please have a look.
Your app's data is deleted when your user removes the app. If you want to, you can remove the files using Ruby's File class methods on the persistent store.
In the README [here](https://github.com/sxross/MotionModel#serialization) you can see that persistence to the sandbox is done by filename. When your user logs out, you can adopt one of several strategies: - Delete...
I wrote a straw man that I think would solve your problem: https://github.com/sxross/MotionModel/wiki/Strategy-for-MotionModel-Persistence
This change makes me nervous. Using dup on a collection will, at a minimum, create a lot of garbage each time the `all` method is called. At worst, instances of...