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

Add search page module and remove controller extension #58

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

Conversation

sascha-karnatz
Copy link
Contributor

The controller methods were available on every page in Alchemy and was listening to the query param. This approach is not really extendable, if you need multiple parameter to process the search result. The main logic was moved into a SearchPage module which has nearly the same structure as before, but is now way more flexible, because it is only used in this particular page layout. It also allows the application to extend the search and the view without monkey patching the gem. The only downside is, that it isn't possible anymore to add a search string the searchresults - element to test the search in the admin interface.

The controller methods were available on every page in Alchemy and was listening to the query param. This approach is not really extendable, if you need multiple parameter to process the search result.
The main logic was moved into a SearchPage module which has nearly the same structure as before, but is now way more flexible, because it is only used in this particular page layout. It also allows the application to extend the search and the view without monkey patching the gem.
The only downside is, that it isn't possible anymore to add a search string the searchresults - element to test the search in the admin interface.
@tvdeyen tvdeyen added this to the v6.0 milestone Oct 14, 2024
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.

2 participants