Rails 6 adds db:prepare rake taskRails 6 adds db:prepare rake task which creates the database, loads the schema, runs the migrations and initializes with the seed data
Rails 6 adds Array#including, Array#excluding, Enumerable#including, Enumerable#excludingRails 6 adds Array#including, Array#excluding, Enumerable#including, Enumerable#excluding
Rails 6 adds Relation#reselectRails 6 add a reselect method to Relation. This is a short-hand for "unscope(:select).select(fields)".
Rails 6 adds support for timezones to Active JobRails 6 now supports preserving timezones to Active Job. It record what was the current timezone in effect when the job was enqueued and then restore when the job is executed in same way that the current locale is recorded and restored.
Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone.Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone. This allows to check if a date/time value is before or after another date/time in a more readable way.
Rails 6 adds negative scopes for all enum valuesRails 6 adds negative scopes for all enum values
Rails 6 adds Enumerable#index_withRails 6 adds Enumerable#index_with to allows creating a hash from an enumerable with the value from a passed block or a default argument.
Rails 6 adds String#truncate_bytesRails 6 adds String#truncate_bytes to limit to N characters without breaking multibytes chars
Rails 6 adds Relation#create_or_find_byRails 6 adds Relation#create_or_find_by to avoid race conditions of Relation#find_or_create_by
Using Rails config_for as a replacement for secrets alongside credentialsRails secrets is deprecated in Rails 6, config_for is a replacement of using ENV specific configuration along with credentials.