Comments (4)
Strange, that code has been working for a long time. Do you have a unit test to reproduce the failure?
from cache-machine.
I thought the problem is what we use polymorphic association:
https://github.com/partyearth/cache-machine/blob/development/spec/lib/cache_machine_spec.rb#L104
from cache-machine.
I can not understand:
NoMethodError (undefined method klass' for nil:NilClass): activesupport (3.0.7) lib/active_support/whiny_nil.rb:48:in
method_missing'
activerecord (3.0.7) lib/active_record/reflection.rb:346:in source_reflection' activerecord (3.0.7) lib/active_record/reflection.rb:346:in
collect'
activerecord (3.0.7) lib/active_record/reflection.rb:346:in source_reflection' activerecord (3.0.7) lib/active_record/reflection.rb:407:in
derive_class_name'
activerecord (3.0.7) lib/active_record/reflection.rb:121:in class_name' activerecord (3.0.7) lib/active_record/reflection.rb:162:in
klass'
/home/szinin/.rvm/gems/ruby-1.8.7-p334@pe/bundler/gems/cache-machine-15233080c651/lib/cache-machine.rb:180:in hook_cache_machine_on' /home/szinin/.rvm/gems/ruby-1.8.7-p334@pe/bundler/gems/cache-machine-15233080c651/lib/cache-machine.rb:158:in
has_many'
lib/active_record/log_machine.rb:74:in `has_many'
case (reflection = (target_class = self).reflect_on_association association_id)
when ActiveRecord::Reflection::ThroughReflection
# ERROR HERE
reflection.klass.after_save { target_class.delete_association_cache_on self, association_id }
...
How reflection
can be nil
if when block catched it as ActiveRecord::Reflection::ThroughReflection
?
from cache-machine.
That was an association error in external repo.
from cache-machine.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cache-machine.