Module: ApiResource::Associations::HasManyThroughRemoteObjectProxy
- Defined in:
- lib/api_resource/associations/has_many_through_remote_object_proxy.rb
Instance Method Summary collapse
Instance Method Details
#has_many_through_remote(association, options) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/api_resource/associations/has_many_through_remote_object_proxy.rb', line 4 def has_many_through_remote(association, ) self.instance_eval do send(:define_method, association) do send([:through]).collect{ |t| t.send(association.to_s.singularize) }.flatten end end end |