Permalink
Browse files

Should fix an issue with enumerable.

  • Loading branch information...
1 parent 0f38788 commit e222cd739846148b40a77ba30af70a75203b90ae @sam sam committed Apr 10, 2008
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/data_mapper/associations/one_to_many.rb
@@ -51,7 +51,13 @@ class Instance
extend Forwardable
def_delegators :children, :[], :size, :length, :first, :last
-
+
+ include Enumerable
+
+ def each
+ children.each { |child| yield(child) }
+ end
+
def children
@children_resources ||= @children_loader.call
end

0 comments on commit e222cd7

Please sign in to comment.