Sha256: e47f731f1716d1bba545a8af1a68b3bcdf90e02930e88c25b0a6147b262c5ed9

Contents?: true

Size: 305 Bytes

Versions: 19

Compression:

Stored size: 305 Bytes

Contents

module MongoMapper
  module Associations
    class Collection < Proxy
      def to_ary
        load_target
        if target.is_a?(Array)
          target.to_ary
        else
          Array(target)
        end
      end
      
      def reset
        super
        target = []
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 4 rubygems

Version Path
mrkurt-mongo_mapper-0.6.11 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2010.1.6 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2010.1.5 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2010.1.4 lib/mongo_mapper/associations/collection.rb
tpitale-mongo_mapper-0.6.10 lib/mongo_mapper/associations/collection.rb
mrkurt-mongo_mapper-0.6.10 lib/mongo_mapper/associations/collection.rb
mongo_mapper-0.6.10 lib/mongo_mapper/associations/collection.rb
mrkurt-mongo_mapper-0.6.9 lib/mongo_mapper/associations/collection.rb
mongo_mapper-0.6.9 lib/mongo_mapper/associations/collection.rb
mrkurt-mongo_mapper-0.6.8 lib/mongo_mapper/associations/collection.rb
tpitale-mongo_mapper-0.6.9 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2009.12.30 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2009.12.29 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2009.12.23 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2009.12.22 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2009.12.16 lib/mongo_mapper/associations/collection.rb
mongo_mapper-0.6.8 lib/mongo_mapper/associations/collection.rb
mongo_mapper-unstable-2009.12.14 lib/mongo_mapper/associations/collection.rb
mongo_mapper-0.6.7 lib/mongo_mapper/associations/collection.rb