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

Is there any way to ignore attributes? #1004

Open
kaibadash opened this issue Feb 2, 2024 · 0 comments
Open

Is there any way to ignore attributes? #1004

kaibadash opened this issue Feb 2, 2024 · 0 comments

Comments

@kaibadash
Copy link

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
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

1 participant