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

Can't merge custom context when using collection #24

Open
bootleq opened this issue Apr 21, 2017 · 1 comment
Open

Can't merge custom context when using collection #24

bootleq opened this issue Apr 21, 2017 · 1 comment

Comments

@bootleq
Copy link

bootleq commented Apr 21, 2017

I'm in a Rails project, using concept helper to do render:

concept('some/cell/index', collection: Song.all, context: {foo: :bar})

While I found the context hash will always be overwritten as {controller: ...}, but my expected result is a hash with foo key.

Some tracing:

Does my usage reasonable? If yes I think we can do a deep_merge to avoid options overwritten.

@adambair
Copy link

adambair commented Oct 4, 2017

I just ran into a similar issue -- found a workaround... adding nil in the place of an object allowed me to work around this and get the object I expected from context:

= concept('deal/cell', nil, context: { fields: ff }).(:form)

Perhaps if you tried:

concept('some/cell/index', nil, collection: Song.all, context: {foo: :bar})

You'd be in luck?

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

2 participants