Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update how nested perspectives are setup for collections #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emerson-h
Copy link

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected behavior in calculation of default as option for nested collections
1 participant