Skip to content

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