Rails

WebAuthn Passwordless Auth in Rails

Learn how to set up WebAuthn in Rails for passwordless authentication, offering a secure and seamless login experience using biometric or hardware-based

Rails 8 Multiple Rate Limits Per Controller

Rails 8 introduces the ability to define multiple rate limits within a controller, offering better flexibility for traffic management.

Rails 7.2 explain Method Enhancements

With Rails 7.2, the object returned by explain now responds to pluck, first, last, average, count, maximum, minimum, and sum methods.

Rails 7.1 Counter Methods Accept By Arg

Rails 7.1 adds a `by` argument to increment_counter and decrement_counter, allowing updates by custom amounts instead of just 1.

Rails 7.1 application.deprecators Method

Rails 7.1 adds Rails.application.deprecators for fine-grained control over deprecation warnings, including debug mode and silencing.

Rails 7.2 Job Scheduling in Transactions

In Rails 7.2, ActiveJob delays job enqueuing until the transaction is committed and drops the job if the transaction is rolled back.

Rails 7.1 Validators Accept Lambdas

With Rails 7.1, we can use lambdas without record argument with ActiveModel validators.

Rails 7.1 Array#intersect? for AR Relations

Rails 7.1 added Array#intersect? method which returns true if two ActiveRecord relation objects have at least one element in common, otherwise returns false.

Rails 7.1 Controller Generator --parent

With Rails 7.1, the controller generator now accepts the --parent option. This allows us to generate a controller that inherits from the specified parent class.

Rails 7.1 Reserved Attribute Name Error

Rails 7.1 raises error when we generate model with reserved attribute names.