My Stackoverflow question: 
http://stackoverflow.com/questions/17461273/where-does-association-extension-sit-in/17664817?noredirect=1#17664817

I have an association extension method like the following:

class Bundle < ActiveRecord::Base
  has_many :items do
    def foo
    end
  end

I was trying to use delayed job/sidekiq delay() method like the following:

b.items.delay.foo

But I can't. You see, when delay is called, association evaluated 
immediately to an array of records. That array does not have the 
association extension methods.

So I tried to see if  b.items.proxy_association, has my extension methods, 
and to my surprise, foo() is not there either.

Which object does my foo() method sit in?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/6f2bbd72-5df1-407c-98d4-915b9d9ca8bd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to