Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

work around another not implemented error in 1.9.2

  • Loading branch information...
commit 5281067787b014f9c2af808e6eb4213f43a5a0db 1 parent 6ad94f2
@langalex authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/couch_potato/persistence/ghost_attributes.rb
View
12 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
+
Please sign in to comment.
Something went wrong with that request. Please try again.