You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel cache_money is great, especially for its support of transaction. I haven't seen any others provide such feature.
However, I need to use rails as the backend of a Flex project, and use rubyamf (http://code.google.com/p/rubyamf/) to communicate with the front side. When an ActiveRecord (e.g. User) is configured with class mapping:
User.find 1 reports some error:
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.indices
from (DELEGATION):2:in __send__' from (__DELEGATION__):2:inindices'
from (DELEGATION):2:in __send__' from (__DELEGATION__):2:inindices'
from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:114:in indexed_on?' from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:56:incacheable?'
from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:15:in perform' from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/primary_key.rb:17:inperform'
from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:7:in perform' from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/finders.rb:29:infind_from_ids'
from /home/clive/ruby/RailsApplication1/vendor/rails/activerecord/lib/active_record/base.rb:590:in `find'
from (irb):1
and index [:name] in User class also reports:
home/clive/ruby/RailsApplication1/vendor/rails/activerecord/lib/active_record/base.rb:1833:in method_missing':NoMethodError: undefined methodindex' for #Class:0xb730f374
I couldn't find a way to attach the rails project I created here. If some one has problem in reproduce the issue, feel free to contact me
The text was updated successfully, but these errors were encountered:
Thanks for your reply. I've figured out the problem. Rubyamf needs to be loaded after cache_money, otherwise cache_money won't be able to override ActiveRecord
I feel cache_money is great, especially for its support of transaction. I haven't seen any others provide such feature.
However, I need to use rails as the backend of a Flex project, and use rubyamf (http://code.google.com/p/rubyamf/) to communicate with the front side. When an ActiveRecord (e.g. User) is configured with class mapping:
User.find 1 reports some error:
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.indices
from (DELEGATION):2:in
__send__' from (__DELEGATION__):2:in
indices'from (DELEGATION):2:in
__send__' from (__DELEGATION__):2:in
indices'from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:114:in
indexed_on?' from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:56:in
cacheable?'from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:15:in
perform' from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/primary_key.rb:17:in
perform'from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/query/abstract.rb:7:in
perform' from /home/clive/ruby/RailsApplication1/vendor/plugins/nkallen-cache-money/lib/cash/finders.rb:29:in
find_from_ids'from /home/clive/ruby/RailsApplication1/vendor/rails/activerecord/lib/active_record/base.rb:590:in `find'
from (irb):1
and index [:name] in User class also reports:
home/clive/ruby/RailsApplication1/vendor/rails/activerecord/lib/active_record/base.rb:1833:in
method_missing':NoMethodError: undefined method
index' for #Class:0xb730f374I couldn't find a way to attach the rails project I created here. If some one has problem in reproduce the issue, feel free to contact me
The text was updated successfully, but these errors were encountered: