Skip to content

Commit

Permalink
Link to blog post on using objects in models
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepalmer committed Mar 21, 2009
1 parent 0135691 commit 614b064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
0.7.14 - Fix date/time types in .to_xml
0.8.0 - Allow :id and :rev in attributes= method, although values will be ignored. Minor version change an accident, should have been patch
0.8.1 - Address.find.all in readme should be Address.all
0.8.2 - Add link to blog post on using objects with models
9 changes: 5 additions & 4 deletions lib/couch_foo/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1037,10 +1037,11 @@ def set_inheritance_column(value = nil, &block)
# Set a property for the document. These can be passed a type and options hash. If no type
# is passed a #to_json method is called on the ruby object and the result stored in the
# database. When it is retrieved from the database a class.from_json(json) method is called
# on it or if that doesn't exist it just uses the value. If a type is passed then the object
# is cast before storing in the database. This does not guarantee that the object is the
# correct type (use the validaters for that), it merely tries to convert the current type to
# the desired one - for example:
# on it or if that doesn't exist it just uses the value (more on this at
# http://www.rowtheboat.com/archives/35). If a type is passed then the object is cast before
# storing in the database. This does not guarantee that the object is the correct type (use
# the validaters for that), it merely tries to convert the current type to the desired one
# - for example:
# '123' => 123 # useful
# 'a' => 0 # probably not desired behaviour
# The later would fail with a validator
Expand Down

0 comments on commit 614b064

Please sign in to comment.