On Mon, Jun 6, 2011 at 7:29 PM, Wes Gamble <we...@att.net> wrote: > I can't change the value of the sheet_cache_timeout class attribute on > SiteController. I don't understand why this doesn't work. > > Here is a script/console session: > > /Users/weyus/.rvm/rubies/ruby-1.8.7-p334/bin/ruby -e > $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) > /Users/weyus/Documents/workspace/konditioning/script/console > --irb=/Users/weyus/.rvm/rubies/ruby-1.8.7-p334/bin/irb > Loading development environment (Rails 2.3.11) > config.gem: Unpacked gem devise-1.0.8 in vendor/gems has no specification > file. Run 'rake gems:refresh_specs' to fix this. > config.gem: Unpacked gem devise-1.0.8 in vendor/gems has no specification > file. Run 'rake gems:refresh_specs' to fix this. >>>SiteController.sheet_cache_timeout > => 30 days >>>SiteController.sheet_cache_timeout = 1.second > => 1 second >>>SiteController.sheet_cache_timeout > => 30 days > > What gives? Does cattr_writer not work the way that I think it should? > > Thanks, > Wes
It looks like I need to fix some code there. I put this in early on because I knew we'd want the timeout to be different but it obviously needs more testing. Here's what I found >> SiteController.send(:class_variable_set, :@@sheet_cache_timeout, 1.second) => 1 second >> SiteController.sheet_cache_timeout => 30 days >> SiteController.send(:class_variable_get, :@@sheet_cache_timeout) => 1 second -Jim -- Jim Gay Saturn Flyer LLC http://www.saturnflyer.com 571-403-0338