Class: DynamicActiveResource::Associations::BelongsTo
- Defined in:
- lib/dynamic_active_resource/associations/belongs_to.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from DynamicActiveResource::Associations::Base
Instance Method Details
#resources_for(caller) ⇒ Object
4 5 6 7 8 |
# File 'lib/dynamic_active_resource/associations/belongs_to.rb', line 4 def resources_for(caller) site_elements = caller.class.site.path.split('/') associated_resource_id = site_elements[-1] associated_class.find(associated_resource_id) end |