forked from langalex/couch_potato
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hashes with symbolized keys; persist classes (even inside hashes and …
…arrays); updated readme
- Loading branch information
Nico Hagenburger
committed
Oct 11, 2009
1 parent
26eee7d
commit 78376f8
Showing
5 changed files
with
118 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class Hash | ||
|
||
# def self.json_create hash | ||
# hash.symbolize_keys! | ||
# if hash[:ruby_class] | ||
# klass = eval(hash.delete(:ruby_class)) | ||
# klass.new(hash) | ||
# else | ||
# hash | ||
# end | ||
# end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78376f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, i did add your specs and they now pass without adding all that code, because of this http://github.com/railsbros/couch_potato/commit/ed9ea16bd6cf6bf6889ce074c1ac6679bb1132cc