Genius / perspectives

Render shared views on the client OR on the server
https://github.com/RapGenius/perspectives
MIT License
77 stars 5 forks source link

Update how nested perspectives are setup for collections #4

Open emerson-h opened 10 years ago

emerson-h commented 10 years ago

Nested Collections with namespaced models were receiving very odd defaults for the as option. For instance,a nested collection for instances of SomeModule::Group was creating a Collection with :somemodule::group as the as option. This makes defining a perspective that leverages the default as param rather cumbersome. Additionally, because of the call to base_class in the calculation of the default for as, it was impossible to define a nested collection for a PORO with an associated persepctive. I updated the calculation of the default to demodulize class names and to only call base_class when it is available.

This possibly fixes #3