-
Notifications
You must be signed in to change notification settings - Fork 172
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
Best approach for nested models? #49
Comments
I'm planning on implementing a "subresource" feature at some stage. However you are correct that this isn't currently handled properly, and something like you have is probably the best solution so far. |
I appreciate the feedback! I know it's still pretty early, but I've enjoyed using Trestle so far. 👍 |
I needed a solution for subresources too and used trestle/lib/trestle/resource/builder.rb Line 97 in fbcc5ec
Commenting here in case someone needs it in the future. |
I have a few nested resources (including a hierarchy of the same model) and I was wondering what the best approach for handling this is.
Currently I am overriding large parts of the controller to redirect to to the right place after certain actions (like delete, for instance) and to insert the parent record into the breadcrumb trail.
Here's an example:
I'm doing something similar in a few places and was wondering if there's a better way I'm missing, or if this isn't really handled properly yet.
Thanks!
The text was updated successfully, but these errors were encountered: