orslumen/record-cache — Issue #12: as_json and to_xml
Author: alecslupu
Created: 2012-01-24 21:23:54+00:00
State: open

Hello!

I have tried to use your plugin, but unfortunately, i have a problem with it ...
In my models i have some "to_xml" and "as_json" methods, while in my controller i have only respond_to :xml , :json
If i am applying your cache ... i get some nasty error:

RuntimeError (can't modify frozen string):
app/models/collection.rb:20:in `to_xml'
app/controllers/static/collection_controller.rb:10:in `all'

I have dug up into your code, and i have seen that indeed, your plugin is "freezing" model ...
I dunno what to do, as i am a beginner in ruby and rails ... so i do not know what to actually do ... (i mean is my code the problem ? or is the problem from the plugin ?)

I could bypass that "freeze" stuff, but i dunno what are the problems that could be generated if i would remove it ...

Thanks