Favorite Rails 6.0 Small Changes

My two favorite new Rails 6.0 small changes/features are:

`rails db:system:change` to change the database of the application.

`rails db:prepare` to create a database if it doesn't exist, and run its migrations.

What are the small changes/features you are looking forward to?

3 thoughts on “Favorite Rails 6.0 Small Changes”

  1. A feature I added to Rails 6 and I’m excited about: you can specify “rich_text”, “attachment” and “attachments” types in your generators now.

    “`
    rails g model User name email avatar:attachment
    rails g model Page images:attachments
    rails g model Comment body:rich_text
    “`

    Since associations already add some of the `belongs_to` lines to the models, I thought why not add these to make it just a little quicker. Then I realized that they were the first time the generators would have any fields that were “virtual” and didn’t add columns to the db.

    Reply

Leave a Comment