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

Possible Tag names to be searchable ? #1

Open
behindthebid opened this issue Jun 30, 2019 · 2 comments
Open

Possible Tag names to be searchable ? #1

behindthebid opened this issue Jun 30, 2019 · 2 comments

Comments

@behindthebid
Copy link

When adding a tags to the AttributeType it would be cool to be able to specify them as searchable in the Administrate dashboard.

Something like

class SituationDashboard < Administrate::BaseDashboard
  ATTRIBUTE_TYPES = {
    tags: Field::ActsAsTaggable.with_options(searchable: true, searchable_field: 'name')

Currently, this crashes when doing a search with
PG::UndefinedColumn: ERROR: column situations.tags does not exist

@wkirby
Copy link
Contributor

wkirby commented Jun 30, 2019

@behindthebid I agree, that would be cool — I'll have to dig into the Administrate API to see how much we get to control the searchable bit. As far as I'm aware, searchable: true takes the symbol from the ATTRIBUTE_TYPES hash and interpolates it into the DB query, and we don't get much say in how that works.

I'll try to find some time this week to look into it.

@behindthebid
Copy link
Author

awesome, looking forward to hearing what you can dig up 👍

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

No branches or pull requests

2 participants