Rails6

Rails 6 Adds before? and after? to Date/Time

Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone.

Rails 6 Adds Negative Scopes for Enum Values

Rails 6 adds negative scopes for all enum values, making it easier to query records that don't match specific enum states.

Rails 6 adds Enumerable#index_with

Rails 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 config_for: Secrets to Credentials

Rails secrets is deprecated in Rails 6, config_for is a replacement of using ENV specific configuration along with credentials.

Rails 6 adds String#truncate_bytes

Rails 6 adds String#truncate_bytes to limit to N characters without breaking multibytes chars

Rails 6 adds Relation#create_or_find_by

Rails 6 adds Relation#create_or_find_by to avoid race conditions of Relation#find_or_create_by