Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
An idea I wanted to get into the API...
Browse files Browse the repository at this point in the history
  • Loading branch information
sam committed Mar 28, 2008
1 parent 1c48c90 commit 9cbadc7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/data_mapper/resource.rb
Expand Up @@ -266,6 +266,15 @@ def create(values)

[instance, instance.save]
end

# TODO SPEC
def copy(source, destination, options = {})
repository(destination) do
repository(source).all(self, options).each do |instance|
self.create(instance)
end
end
end
end
end
end

0 comments on commit 9cbadc7

Please sign in to comment.