annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

ActiveAdmin resources don't get annotated after migrations

Open vfonic opened this issue 4 years ago • 0 comments

Commands

# suppose we have a fictional Post model
$ rails g migration AddReadingTimeToPosts reading_time
$ rails db:migrate

Output

Actual

== 20200312212633 AddReadingTimeToPosts: migrating ==============================
-- add_column(:posts, :reading_time, :string)
   -> 0.0020s
== 20200312212633 AddReadingTimeToPosts: migrated (0.0021s) =====================

Annotated (3): app/models/post.rb, spec/models/posts_spec.rb, spec/factories/posts.rb
config/routes.rb was annotated.

Expected

== 20200312212633 AddReadingTimeToPosts: migrating ==============================
-- add_column(:posts, :reading_time, :string)
   -> 0.0020s
== 20200312212633 AddReadingTimeToPosts: migrated (0.0021s) =====================

Annotated (3): app/admin/post.rb, app/models/post.rb, spec/models/posts_spec.rb, spec/factories/posts.rb
config/routes.rb was annotated.

(The only diff is that it's expected that ActiveAdmin resource gets annotated as well)

Version

  • annotate 3.1.0
  • rails 5.2.4.1
  • ruby 2.6.5

vfonic avatar Mar 12 '20 21:03 vfonic