Skip to content
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

Introduce partial search similar to Rails #2467

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

goosys
Copy link

@goosys goosys commented Dec 7, 2023

Introduced partial search similar to Rails, as an alternative to to_partial_path.

Models that have an inheritance relationship often use similar or almost identical partials.
Being able to reuse partials not only makes it easier to create new fields, but also improves maintainability.

I tried deleting the HasManyVariant partial as a test, and it continues to operate normally using the HasMany partial.
Pleach check customers.log_entries field.
http://localhost:3000/admin/customers
http://localhost:3000/admin/customers/4

Please review.


refs
https://github.com/rails/rails/blob/d39db5d1891f7509cde2efc425c9d69bbb77e670/actionview/lib/action_view/view_paths.rb#L23-L29 https://github.com/rails/rails/blob/d39db5d1891f7509cde2efc425c9d69bbb77e670/actionview/lib/action_view/view_paths.rb#L72-L77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant