-
-
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
Overriding the _collection
template for a model affects has_many
for other models.
#549
Comments
_collection
template for a model affects has_many
for other models.
It's because the How did you solve this problem @hickscorp? I'm debating generalizing that functionality to all models so that it works with all collection partials. (which works for my case -- but not for many other cases) |
there's a solution for this issue in #522, which has been working for me... |
@toobulkeh no, and we ended up completely rewriting the view. We're thinking about abandoning Administrate for multiple reasons now, one of them being this, the other one being the fact that Administrate is super-confused when asked to sort on "computed columns" (Eg values defined as a getter and a setter on the model, without database counterparts). There should be a flag to tell Administrate about those. |
A potential solution for this would be to pass an additional parameter to the |
I'm trying to get the index listing for a specific model to show an extra link where the "Edit" and "Destroy" buttons are located. The model name being
Foo
, I've created a view withinapp/views/admin/foos/_collection.erb
. It works great on the rootFoo
listing page.However, an instance of
Foo
can have many ofBar
. When I select aFoo
, the detail page shows a list ofBar
object there, and unfortunately the same collection template is used.Is that a bug, or am I missing something?
The text was updated successfully, but these errors were encountered: