Here's the basic description of the domain I'd like to represent,
which has a few complications involved that I'm not sure how to
handle:
/locations/:id/resources/:resource_name/properties/:property_name/
values
A unique property can only be represented by the combination of
location id, resource name, and property name. On the backend,
though, there are currently only three ActiveRecord models represented
by the full path above: a location model, a combined resource+property
model (which belongs_to a location), and a value model. Thus, the
intermediate location/:id/resources path will be returning data that
doesn't directly map to an ActiveRecord model, and the full parent
chain for values objects will be the equivalent of
locations.find(:id).resource_properties.find_by_resource_name_and_property_ name(res_name,
prop_name).values.
So: Does this require the deep nesting branch? What items will need
to be tweaked in the resources, properties, and values controllers to
handle the model situation described above? This is currently
planned to be a read-only API for accessing this data, so index and
show are the only two actions I need to support at the moment.
Apologies if I've missed some existing documentation that addresses
this kind of situation.