Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection.clone() #1239

Merged
merged 2 commits into from Apr 23, 2012
Merged

Collection.clone() #1239

merged 2 commits into from Apr 23, 2012

Conversation

philfreo
Copy link
Contributor

Models have a .clone() and it seems like you should be able to clone a collection, so that you can operate on a copy of the collection / list of models separately (even though both would reference the same model objects)

@jashkenas
Copy link
Owner

Before we merge this -- what was your use case where you found yourself needing this?

@philfreo
Copy link
Contributor Author

I needed to temporarily operate on a collection/list of models (add and remove them), but didn't want to affect the original collection/list until the user was sure they wanted to commit & save their changes. Basically needed a way to have a cloned copy of the collection :)

jashkenas added a commit that referenced this pull request Apr 23, 2012
@jashkenas jashkenas merged commit 04a778c into jashkenas:master Apr 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants