-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Modify has_many field show #522
Modify has_many field show #522
Conversation
Why: * The template is rendering the incorrect partial. This change addresses the need by: * Create field helper `collection_partial`.
Why: * Tests are failing are changes are not working. This change addresses the need by: * The new helper is an instance method on field.
Can anyone rerun the tests on CircleCI? It looks like a non-code issue cause it to fail. |
I've just hit this bug, is there anything that needs to be done for it to be merged? |
Has there been a decision on whether this is the right way to fix this? I'd love to see a solution asap, and would be happy to help work towards one if there are any concerns about what has been proposed here. |
@jasontwong thanks for your fix here, I've been using it in my application and all good so far! One thought though... say for example you have a if that partial has not been overridden however, it still defaults to the |
@hughfm I'm glad it's been working well for you. The only reason why I left it to use the |
Yep that's fair enough @jasontwong, would love to hear thoughts on this from the team.. |
Move link to group history inside show partial, since administate renders incorrect partial if collection is overriden (see thoughtbot/administrate#522)
If you're trying to fix this bug in Rails 5, I've merged both the rails5 compatibility branch and this branch here: https://github.com/MAPC/administrate Include in your Gemfile like this: In order to get the fix applied, you do have to generate the related model's partial with |
@nickcharlton There's a question here about whether or not this is the right approach. |
Hi! I'm just getting around to looking at this now. I think this is a reasonable approach to the problem. Are we able to test this in both scenarios (using a default collection template, using a custom one)? |
It's been a while since I looked at this... I'll dig into the testing. |
Hi @jasontwong! Did you get anywhere with looking at the testing? |
Has there been any progress on this? |
@jasontwong Did you get a chance to look at this again? |
Closing as there has been no activity for a while. Happy to reopen if someone wants to take over. |
Resolves #440
Why:
This change addresses the need by:
collection_partial(namespace)
.has_many/_show.html.erb
to use new helper.