mongo_mapper-unstable 2010.07.02 → 2010.07.05

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/examples/keys.rb +3 -0
  2. metadata +3 -3
data/examples/keys.rb CHANGED
@@ -13,6 +13,7 @@ class User
13
13
  key :age, Integer
14
14
  key :skills, Array
15
15
  key :friend_ids, Array, :typecast => 'ObjectId'
16
+ key :links, Hash
16
17
  timestamps!
17
18
  end
18
19
  User.collection.remove # empties collection
@@ -22,6 +23,7 @@ john = User.create({
22
23
  :last_name => 'Nunemaker',
23
24
  :age => 28,
24
25
  :skills => ['ruby', 'mongo', 'javascript'],
26
+ :links => {"Google" => "http://www.google.com"}
25
27
  })
26
28
 
27
29
  steve = User.create({
@@ -32,6 +34,7 @@ steve = User.create({
32
34
  })
33
35
 
34
36
  john.friend_ids << steve.id.to_s # will get typecast to ObjectId
37
+ john.links["Ruby on Rails"] = "http://www.rubyonrails.com"
35
38
  john.save
36
39
 
37
40
  pp john
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2010
7
7
  - 7
8
- - 2
9
- version: 2010.07.02
8
+ - 5
9
+ version: 2010.07.05
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Nunemaker
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-02 00:00:00 -05:00
17
+ date: 2010-07-05 00:00:00 -05:00
18
18
  default_executable: mmconsole
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency