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

Context when nesting cells? #429

Open
ericgross opened this issue Sep 12, 2016 · 2 comments
Open

Context when nesting cells? #429

ericgross opened this issue Sep 12, 2016 · 2 comments

Comments

@ericgross
Copy link

We are calling a cell from the controller with a context, and that cell is rendering cells inside of itself passing a context. It appears that the context for the nested cells are the same as the original context specified in the controller and that the context that is added directly in the slim template is not available in the nested cell.

Shouldn't the context for nested cells be a superset of the cells' callers' context?

@apotonick
Copy link
Member

Currently, the context is "global".

@Xanthus
Copy link

Xanthus commented Feb 1, 2017

+1 for this issue. Instantiated a cell from within another cell and passed in a context hash but the 'child' cell's context was overridden to the parent cell's context instead so the extra context was lost. Seemed a bit counterintuitive - I was expecting an overwrite (i.e. child cell would get the explicit context or a merger of the parent's context and the supplied context), but not for it to be silently ignored. Ended up using the options hash instead.

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

No branches or pull requests

3 participants