administrate
administrate copied to clipboard
Fix redirect after delete resource without index
fix #626
Steps to reproduce
-
Resourse A
has manyResource B
-
Resourse B
has no index page - go to show page of
Resourse A
and click on destroy ofResource B
- resource is destroyed
Behavior before this fix
-
An error is raised
Behavior after this fix
-
is redirected
Resourse A
show page
@pablobm
Thank you @edimossilva!
I see why you had to create a new model
MetaTagGroups
. The way the example app is put together is not great. I'm currently working on a branch that will bring some order to this.A few days before you, someone created a related PR: #1973. I think yours may complement it. I feel that, instead of creating this new query param
origin_url
, perhaps the same effect could be achieved by overridingafter_resource_destroyed_path
, as provided by the other PR. What do you think? If you think it makes sense, we should wait until the other PR is merged before rebasing yours on top.
Hi @pablobm , PR #1973 looks nice. I agree that the best way is overriding after_resource_destroyed_path
. Let's wait for the merge of #1973 and rebase this one.
About the new model MetaTagGroups
. Should I wait for your branch as well?
I'd say let's wait for #1973 first and then let's see where my branch is when it arrives, and if we can use my branch to simplify your spec.
This is the branch that reorganises the example app: https://github.com/thoughtbot/administrate/pull/1998. When it's merged, we can revisit this PR.
This is the branch that reorganises the example app: #1998. When it's merged, we can revisit this PR.
@pablobm , please review, thanks!
Closing due to lack of activity.