I also have a use case for this, and have implemented it in a similar way
to Yannis. We use it as a safety net - all devs know that they shouldn't
delete protected models, but there are some models (such as financial
transactions) that we want to add a safety net to.
On Monday, 27 April 2015 09
Here is the problem : the memory is duplicated when forking and calling GC
in 2.2.1. The main issue here is that I am operating on huge data, going up
to 1GB, and when the GC is running and I am forking a process, it is
killing my machine since the 1GB becomes 2GB.
We have written a small pr
On Apr 26, 2015, at 5:08 PM, Yannis Kolovos wrote:
>
> I would like to protect my model in production of of being deleted
>
>
> It would be nice if rails provide this functionality by default ?
> I don't know if there is a functionality like this already but for me its
> something fundamenta
I'm not sure if this does the same but you could add `readonly` in the
`default_scope`, this way all initialized objects will always be read
only and protected from destruction.
On 04/27/2015 03:05 AM, Ryan Bigg wrote:
In what instance would people be calling destroy on your model without
real