Forum: Ruby on Rails Rails 2.2.2 and Interlock plugin

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rob L. (Guest)
on 2009-01-05 12:34
(Received via mailing list)
Hi there,

Does anyone use the Interlock plugin and got it to work with Rails
2.2.2. I am currently upgrading our app to Rails 2.2.2 and its been a
pretty nice transition so far until I kept getting the 'can't update
frozen hash' errors when calling update_attributes on a (in this case)
User object. We are using Interlock for caching result from
ActiveRecord. We're not doing anything particularly fancy.

@user = User.find(params[:id])
@user.update_attributes(params[:user])

The @user object is showing as frozen directly after the find, it
appears that when read from the interlock the object is frozen. The only
way around this I can see is to remove the plugin or use
User.find(params[:id], {}) to skip the cache. Although this problem will
likely re-occur all over the application. The strange thing is I cannot
replicate this in the console, in a controller test or by calling
User.send(:find_by_cache, [1]) directly. It only occurs when called
within my controller so I am quite stumped to be honest.

Does anyone else have or has any one else seen this problem?

Cheers

RobL
This topic is locked and can not be replied to.