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
  • Issues
  • #1692
Closed
Open
Issue created Jun 29, 2020 by Administrator@rootContributor

Support Rails's alias_attribute (inside search)

Created by: JavierM42

I used alias_attribute to change an attribute name at the model level (my db is shared so I can't simply rename the column). I then changed the attribute_types, collection_attributes and show_page_attributes to the new name, and everything worked but the search, which throws

PG::UndefinedColumn: ERROR:  column table.aliased_column does not exist
LINE 1: ... AS CHAR(256))) LIKE '%search_query%' OR LOWER(CAST("...
  • Rails 6.0.3.2
  • administrate 0.13.0

I know that I can change labels to make the user-facing text be whatever I want, but it would be nice to support aliases to improve the developer experience.

Assignee
Assign to
Time tracking