Mike Laurence
2008-Jan-26 00:39 UTC
"value must be enumerable" exception when using a sweeper?
Folks, I''m going slightly crazy here - I implemented a Sweeper in an older app and used nearly the same exact code in my new app, yet I keep getting this ''value must be enumerable'' exception. Even after I cut most of the code away, I still get the error. If anyone can help, I would be much obliged. Notes: I''m using Engines... wonder if that could cause a problem. And yet, if I ''observe'' my User model, which is part of my main app and not an engine or plugin, it still gives me the same exception. Thanks! -------------------- application.rb: cache_sweeper :commerce_sweeper -------------------- commerce_sweeper.rb: class CommerceSweeper < ActionController::Caching::Sweeper observe Product def after_save(record) end end -------------------- exception: C:/dev/ruby/lib/ruby/1.8/set.rb:275:in `+'' C:/dev/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/observer.rb:149:in `initialize'' C:/dev/ruby/lib/ruby/1.8/singleton.rb:95:in `new'' C:/dev/ruby/lib/ruby/1.8/singleton.rb:95:in `instance'' C:/dev/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/caching.rb:570:in `cache_sweeper'' C:/dev/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/caching.rb:568:in `each'' C:/dev/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/caching.rb:568:in `cache_sweeper'' C:/dev/workspace/BocueCommerce/app/controllers/application.rb:12 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---