This Week in Rails

October 15, 2021

Auto timestamps on bulk inserts, HTML safe translations in controllers and more

Hey, Wojtek here with last week updates from the Ruby on Rails world.

Set timestamps on insert_all/upsert_all record creation
The timestamps will be automatically set when using bulk insert/upsert. This behaviour can be disabled by the record_timestamps config on the model class.

Treat html suffix in controller translation
When translation key ending with _html is used it will be marked as HTML safe in the same way as in the views.

Add support for FILTER clause to Arel
Can be used with PostgreSQL and SQlite databases to use FILTER clause.

Better Action Text plain text output for nested lists
Fixed an issue with how nested lists were displayed when converting to plain text.

Add support for custom CSRF strategies.
Can be used via protect_from_forgery with: CustomStrategy among built in options: exception, reset_session, null_session.

Clear secure password cache if password is set to nil
user.password = 'something'
user.password = nil

# before:
user.password # => 'something'
# now:
user.password # => nil

29 people contributed to Rails since the last time. All the changes can be checked here. Until next week!