Skip to content

Is there any way to ignore attributes? #1004

Description

@kaibadash

Is there any way to ignore attributes? For example, I wrote the following attribute.

attribute :text, default: -> { Time.current.strftime("%Y/%m/%d %H:%M") }

annotate_models gem generated following annotate. It is a hindrance for version control.

# text :string default("2024/01/31 21:22"), not null

In my opinion, what we want to see is the DB definition. Reflecting an attribute seems like overkill.
Is it possible to do any of the following?

  • not refer to the attribute
  • Options like exclude_files that do not target certain files for annotate_models

Commands

$ bundle exec annotate

Version

  • annotate (3.2.0)
  • rails (6.1.7)
  • ruby 3.1.2p20

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions