-
Notifications
You must be signed in to change notification settings - Fork 39
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
Super Scaffold with custom namespaces properly #242
base: main
Are you sure you want to change the base?
Conversation
Yeah, the more I'm thinking through this one the more it looks like it's going to take some work. We'll need to:
I'm not quite sure I have the solution for this one yet though, so I'll need to work with it to see what I can do. I'm somewhat reluctant to move forward thought because I know there are many namespacing options in the Bullet Train blog, and I want to make sure I'm going with the right one. Probably might benefit to make a RoutingRight now, the routes look like this: begin
namespace :client do
shallow do
resources :teams do
resources :jobs
end
end
end
end |
We can definitely just do this if we want to namespace a model:
For that reason, I'll leave this one as is until further direction concerning what file structure, etc. we want for using |
@gazayas what are your current thoughts on this one? It seems like maybe we don't need it if you can namespace the model directly, as you mentioned? |
@jagthedrummer I think I had a misunderstanding of the use of the |
After thinking over this one some more, from a design aspect I think I would need some more clarity before moving forward with this one. For example, this is the scaffolding command from the documentation:
According to the documentation, the purpose of using the custom namespace is to expose these records so that they're public-facing. You can see here that the resource still belongs to a
Also, I think this will be somewhat of a chore to update since this feature was last functionable when all of the Bullet Train logic existed in one repository (before we started using Tailwind??), but at the same time (if I'm understanding the purpose of it correctly) it would solve #251, and we should probably prioritize it anyways because it's written in the documentation. I can try to tread through this one, I just don't have a clear goal in sight from a code perspective, so I'm not entirely sure what the resulting PR would look like as of now. @andrewculver pinging you for the following questions:
|
Ah, it looks like public-facing resources should only exclusively fall under the |
Continuation of #35.
Example model
Details
In #35 we got the routes to work properly, but there's still some more work to do here.
I was able to scaffold the API controller (which I believe we'll need because it has all of our strong parameters), and I namespaced the class names of the controllers.
However, I'm getting this error and I'm not quite sure how to handle it from here: