I am having an ActiveRecord model with a polymorphic association like this:
class Reach < ActiveRecord::Base
belongs_to :reachable, :polymorphic => true
end
This model acts like a proxy. What I need to do is to forward all method calls on that object to the associated object :reachable
. I think delegate
won't help here because I have to explicitly name all the methods I need to delegate. I need something like delegate :all
to delegate all methods (not all
method).