Tag Archives: path

Containers in the path

Coinciding with the submission of a paper for the ws://rest.2010, several controller methods have been refactorized.

We have made an intensive analysis of use cases of containers in the path, in cases like:



The following methods are now supported:

path_containers will return an array of all the containers in the path. In the last examples, well get [ spaces-global, events-meeting ] and [ groups-3, tasks-4 ]
current_container will search for a container both in path containers, as well as in the containers of current resource. Consider this example:


current_container(:type => :space) #=> returns space-global in all the former cases