Kurt StephensNerd Up! | ||||
archivesHow to duplicate DataMapper objects
How to create a deep clone of a DataMapper::Resource object so it can be stored in a different repository. This does not work:
obj = Foo.first
obj = obj.dup
repository(:other) { obj.save }
<br class="clear" />
|
||||
Recent comments
20 hours 7 min ago
2 days 7 hours ago
3 days 2 hours ago
3 days 16 hours ago
5 days 6 hours ago
5 days 9 hours ago
1 week 11 hours ago
1 week 1 day ago
1 week 1 day ago
3 weeks 17 hours ago