public
Rubygem
Description: Rails Plugin - memoize and store to the db a record attribute generated by any expression or SQL query.
Homepage: http://6brand.com
Clone URL: git://github.com/JackDanger/cached_values.git
Search Repo:
not trying to write to a frozen attribute hash
Jack Danger Canty (author)
Wed Mar 12 20:31:33 -0700 2008
commit  c1544c5228fb8c690b3eb6e0e002d18640965ba4
tree    5d54e71b217da9d97479a5ebfef6258912355681
parent  9983606dee88432361c44b5cfea73ecaf6a62255
...
85
86
87
88
 
89
90
91
...
85
86
87
 
88
89
90
91
0
@@ -85,7 +85,7 @@
0
         unless @owner.new_record?
0
           @owner.class.update_all(["#{cache_column} = ?", value], ["id = ?", @owner.id])
0
         end
0
- @owner.send(:write_attribute, cache_column, value)
0
+ @owner.send(:write_attribute, cache_column, value) unless @owner.frozen?
0
       end
0
       
0
       def typecast_result(result)

Comments

    No one has commented yet.