Rails 2.2.2 and Interlock plugin

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs