-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Router rewrite and support of singleton belongs to resources #3170
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
Conversation
|
/ping @seanlinsley Can you please check this pull-request and if it's ok, I will complete it. Thanks! |
lib/active_admin/router.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer that you remove style changes like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will do it.
PS. Any styleguide you are following?
|
What still needs to be done? I'm hesitant to do an in-depth review of this if there are still a lot of things you want to change. |
|
Rename some methods and add documentation, other things overall will stay the same. |
|
Rebased and updated according to a requirements from the @seanlinsley . Now can be checked. |
|
If everything is ok and can be merged, I can write some more specs for newly introduced class |
|
Can it be reviewed? |
|
Why does it takes so much time? Can I assist some how to get it to be merged faster? I really need it for my few projects. |
|
/ping @gregbell @timoschilling |
|
@Fivell yes, that's what this PR actually does. |
|
@dmitry Just a style question: Why inside the That way we could subclass and have shared behaviour with ease. By the way. 👍 |
|
@bamorim it was left from the previous version of the file. That's a nice idea, I will work on it, once I will have some time and anyone from the maintainers will agree to include this PR into the master :) |
|
@seanlinsley can this feature be merged or at least reviewed? |
|
@dmitry I will do a review, in the next days. But please revert the style changes and code refactorings, as @seanlinsley already said. Your PR has to many noise of style changes. It's not about the style guide, it's about the mix of feature implementation and refactoring. You should never do both at the same time! |
|
@timoschilling I only found one style change: https://github.com/activeadmin/activeadmin/pull/3170/files#diff-55e5e7154c56512a3495ca1876501d08R18 Just two lines. Please point me, where I've changed the style anywhere else (I guess improvement of just 2 lines isn't a real change)? |
|
@dmitry your right that are not so many on a second look.
But the there is one other thing that make it hard to track the change. The code of the ResourceRoutes Line #47 and down are a wild mix of old and new code. In my option ResourceRoutes should move in a own file |
7ea1c82 to
feb3faa
Compare
|
I've moved |
|
Good stuff. Looking forward to this one. |
|
Can it be checked/reviewed and declined or accepted? I will rebase it only after it will be reviewed and accepted. I don't think this should be a show-stopper: 46f94a1 |
|
46f94a1 is not a show stopper! But can you make a rebase please. In your discripten you write 4 Tasks, but only checked 2 as done, what about the last 2? I need some time to review it. But I will do it in the next days. |
- Rewrite of the router definitions - Add`s ability to define singleton resource
feb3faa to
3349e6a
Compare
|
Updated description and rebased. |
|
Please take a look on the I like the idea from @bamorim:
I like your work 👍 and will merge it after that changes. |
|
@timoschilling shoud I use your |
|
@dmitry you can use my or write your one. The important think is that shouldn't be in one commit. |
|
Can't find |
|
it's back again, sorry for that |
|
@dmitry (ping) |
|
@timoschilling I will work on this PR today. Not easy to extract |
|
@dmitry any updates? |
|
@timoschilling want to complete today in the evening. |
|
👍 |
|
@dmitry any updates? |
|
Any news regarding this? |
|
Guys, still don't have a time to complete this PR... to much work currently. |
|
Let me know if I can help with anything. I could write a cucumber example for this configuration if it helps getting this patch to completion. Not too sure what the remaining tasks are. |
|
Remaining task is refactoring of the code. :) |
|
Maybe I found some time for it. |
|
One other thing, related to this would be to have the possibility to define a |
|
I'll try to handle this soon if I finish my week tasks on my job. However, what refactoring you think should be applied? I'm thinking about an elegant way to do this and #3280. I'll first finish this and then I'd copy my tests and rewrite it and update my PR. |
|
The plan of @dmitry was to split |
|
And we need a rebase |
|
@bamorim the best think should be you create a new branch based on |
|
@timoschilling wow, I was going to suggest it anyway. hahaha Another thing, maybe we shouldn't have another type of resource? just like Resouce and Page? But this is discussion for another PR, I think. Actually, I think we have to rethink the architecture. Just passing belongs_to to inherited resources is not going to help. We are strongly dependent on them, and valim just stopped supporting it. Probably we should have some kind of adapter for the Inherited Resources. I don't know. |
|
@bamorim I agree with you, but as you say it's all for new PR's / Issues. @rafaelfranca is supporting |
|
@bamorim any updates? |
|
What's the status of this PR? |
|
Given the limited time we have to review PRs and that we'll have to remove Inherited Resources soon (#3604), I don't think we can afford to accept this PR. I'm really sorry it turned out this way 😞 |
It's WIP branch, which will be squashed and completed, after you give me a green light on it.
Related
Singleton resource
Generates correct route with
resourceDSL command, instead ofresources, so it's possible to get access location using the url:/admin/users/1/locationinstead of/admin/users/1/locations.