public
Fork of defunkt/cache_fu
Description: Everyone's favorite memcached plugin for ActiveRecord.
Homepage: http://errtheblog.com
Clone URL: git://github.com/entombedvirus/cache_fu.git
fixing the check to see if we should overwrite the marshalling
alexcharlie (author)
Tue Jul 08 22:49:09 -0700 2008
commit  c365598e5e4cf4fc4d3978aa72c88df54901b10c
tree    eb0e355a28be7f985801b45d469f93046e5ec36e
parent  5370e2f91a1ddd40a02766e155bd27bf3eb043cf
...
1
2
3
4
5
 
6
7
8
9
10
11
 
12
13
14
...
1
2
3
 
 
4
5
6
7
8
9
 
10
11
12
13
0
@@ -1,14 +1,13 @@
0
 module ActsAsCached
0
   module MarshallingMethods
0
     def self.included(base)
0
- puts "HAI"
0
- if base.is_a?(::ActiveRecord::Base)
0
+ if base.ancestors.select { |constant| constant.is_a? Class }.include?(::ActiveRecord::Base)
0
         base.class_eval <<-EOM
0
           def marshal_dump
0
             self.attributes
0
           end
0
         
0
- def marshal_load(raw)
0
+ def marshal_load(attributes)
0
             self.instance_variable_set("@attributes", attributes)
0
             self.instance_variable_set("@attributes_cache", Hash.new)
0
 

Comments

    No one has commented yet.