platanus / potassium

A Rails application generator by Platanus, inspired by Suspenders
MIT License
232 stars 17 forks source link

Models are not being annotated on initial setup (or after any migration) #255

Closed rjherrera closed 4 years ago

rjherrera commented 4 years ago

Even though db:migrate runs after a project is created (#173), models are not annotated. I tried to run db:migrate or db:migrate:with_data after creation and it didn't work either. I am not sure what may be the cause for this but it is currently broken. I tested it with both the unreleased rails 6 and also with rails 5.

Maybe @difernandez can enlighten us 😬.

Thanks to @dacasas who also discovered this.

difernandez commented 4 years ago

So annotate is not running at all? 😞

In #227 I added code to run annotate after data-migrate commands. It might be related to that, but if it's not even running for db:migrate it might be something else entirely. I'll try to give it a look in the short term

rjherrera commented 4 years ago

Not at all 😢 . I started to look and I think that it is related to a breaking change introduced in the 3.0.0 annotate gem version, in which 'models' => 'true' has to be set explicitly for annotate to run automatically.

difernandez commented 4 years ago

Good finding, sounds like it might be just that. I'll check it out on friday