Permalink
Browse files

work around another not implemented error in 1.9.2

  • Loading branch information...
1 parent 6ad94f2 commit 5281067787b014f9c2af808e6eb4213f43a5a0db @langalex committed Dec 10, 2010
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/couch_potato/persistence/ghost_attributes.rb
@@ -3,11 +3,15 @@ module GhostAttributes #:nodoc:
def self.included(base)
base.class_eval do
attr_accessor :_document
- def self.json_create(json)
- instance = super
+ def self.json_create_with_ghost(json)
+ instance = json_create_without_ghost(json)
instance._document = json if json
instance
end
+
+ class << self
+ alias_method_chain :json_create, :ghost
+ end
end
end
@@ -18,6 +22,6 @@ def method_missing(name, *args)
super
end
end
-
end
-end
+end
+

0 comments on commit 5281067

Please sign in to comment.