Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !1131

Numbers are already searchable

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Pablo Brasero requested to merge numbers-are-already-searchable into master Apr 06, 2018
  • Overview 2
  • Commits 6
  • Pipelines 0
  • Changes 4

PR https://github.com/thoughtbot/administrate/pull/1083 arose from a need to look up records by id. I was having a look at it, and realised that I'm not so sure it should be merged in its current state, as I'm starting to think that it looks a bit shoehorned, especially after the recent changes to the search code. I need more time to look into this, and I haven't had much of that lately.

While I was pondering this, I realised that it's already possible to search within number fields, by passing searchable: true as an argument to the field. This PR tests and documents this.

Note that this number search is not perfect. Since it searches through numbers as if they were text, it will match substrings of longer numbers, and similarly unexpected results. It will do for most cases though, so it's worth capturing it in the docs.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: numbers-are-already-searchable