Sha256: b3119ed3ac09daf4f7ff4a60b14b312a45f744e18ec9df083f64c93b455eb1aa
Contents?: true
Size: 639 Bytes
Versions: 34
Compression:
Stored size: 639 Bytes
Contents
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) require 'mongo_mapper' MongoMapper.database = 'testing' class User include MongoMapper::Document end # New Documents puts User.new.cache_key # User/new # Created Documents puts User.create.cache_key # User/:id (ie: User/4c7a940cbcd1b3319b000003) # With Suffix puts User.create.cache_key(:foo) # User/:id/foo # With Multiple Suffixes puts User.create.cache_key(:foo, :bar, :baz) # User/:id/foo/bar/baz # When updated_at key exists it will be used User.timestamps! puts User.create.cache_key # User/:id-:updated_at (ie: User/4c7a940cbcd1b3319b000003-20100829170828)
Version data entries
34 entries across 34 versions & 7 rubygems