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 if option to conditionally hide a collection action #48

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

Conversation

guewen
Copy link

@guewen guewen commented Feb 4, 2025

Here's a way to conditionally hide collection actions.
It may be useful to check permissions or even to hide actions depending on the current scope/filters as we have access to the current params[:q] and params[:scope].

Closes #41

@guewen
Copy link
Author

guewen commented Feb 4, 2025

Hi @workgena, thanks for this useful gem!

I proposed this PR and another one (#47), any chance to have them in a release once reviewed / tests ok?

I was not able to run tests locally (undefined method assets' for an instance of Rails::Application::Configurationwhen runningrake setup`), so I'm not sure tests actually pass.

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.

Use of if proc
1 participant