Rails

How to Use Enums in Rails

A deep dive into what enums are, how to create and configure enums using Rails.

PostgreSQL data-types in Rails

With Rails, there are many built-in data types that PostgreSQL supports. It's a great addition to the developer's toolkit!

Rails adds `authenticate_by` method when using `has_secure_password`

Rails adds `authenticate_by` method that helps mitigate timing-based enumeration attacks.

Use the combined jsbundling-rails gem instead of individual js bundler gems

JSBundling provides a flexible way of using different Javascript bundlers

Rails 7 adds the ability to delete and update queries using GROUP_BY and HAVING

With Rails 7, we can now combine GROUP_BY and HAVING clauses with a more complex update and delete queries.

Rails 7 adds `config.action_text.attachment_tag_name`

Rails 7 adds support for setting `config.action_text.attachment_tag_name` to replace the actiontext's default attachment HTML tag name to a custom string.

Rails 7 adds caching? and uncachable! helper

Starting with Rails 7, we can add caching? helper to check whether the current code path is being cached and uncacheable! helper to avoid fragment caching.

Rails 7 adds :day_format option to date_select

Now format how the day looks in a date select dropdown using `day_format`.

Rails 7: Pass default values to I18n's `translate` method

Provide fallback values to the translate method apart from those parts of the translation string.

Rails 7 adds the ability to check if a location is safe before redirecting

Now determine if a URL is an internal one before redirecting.