Skip to content


Subversion checkout URL

You can clone with
Download ZIP


No way to remove readonly status from cloned activerecord model #5635

cmrichards opened this Issue · 1 comment

2 participants


I'm writing a feature in my application which is used to clone a whole load of activerecord models and their hierachy. So that I accidentaly don't change the original records I am using the #readonly feature on relations. I am using the #clone method to copy those original objects, but there seems to be no way to remove the readonly status on the cloned objects and therefore save the cloned objects.

I think the solution would either be to provide a method to change the readonly status of cloned objects, or to set readonly to false for cloned objects. Can a case be made for cloning the readonly status of an object?



Since this is a feature request with no discussion in a month, I'm closing it.

Generally, the rails-core mailing list is a better place to build support around a feature request with no patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.