Introduction to Ractors in Ruby 3

Ruby 3 has introduced an experimental feature called Ractors. In this article, let's learn more about Ractor with example usage.

How to integrate Font Awesome in Android using AwesomeTextView library?

Implement Font Awesome easily in your Android native app.

Rails 7.1 allows ActiveRecord::QueryMethods#select & #reselect to receive hash values

An ActiveRecord query by default uses the SELECT * operator to select all the fields from the result set. The ActiveRecord::QueryMethods#select method allows you to select a subset of fields from the result set. Before Rails 7.1 ActiveRecord::QueryMethods#select and ActiveRecord::QueryMethods#reselect only accept strings, symbols, or raw SQL to define columns and aliases to select. When querying a single model, we can provide column names as an array of strings or symbols, or we can provide raw SQL. > Model.select(:field, :other_field) > # OR > Model.select('field', 'other_field') > # OR >

Azure Communication Chat SDK: Limitations and Workarounds

Using ACS SDK, we can incorporate a chat feature into our application. In this article, we will see how we can overcome limitations of Chat SDK.

Rails 7.1 adds the --parent option to the Job Generator

Rails 7.1 adds the --parent option using which we can create a job that inherits from the superclass. Let's learn how to use it.

Selenium 4 CDP Integration With Capybara

Let's explore how we can use Chrome Dev Tools Protocols(CDP) with Capybara. We will look at headers, cookies, and cache manipulation using CDP

Manage Rails app secrets with Rails Encrypted Credentials

In your Rails app, manage third-party API tokens and secret access keys with Rails Encrypted Credentials.

Rails 7.1 - Optimizes Active Record batching for whole table iterations

In Rails, Active Record provides batch processing for ActiveRecord::Relation with the in_batches method. In Rails 7.1 the implementation of in_batches has improved to give optimized results for whole table iterations. In this article, we will see how it has improved. Example User.in_batches(of: 3) do |relation| puts relation.to_sql end Before Rails 7.1 Loading development environment (Rails 7.0.4) 3.0.0 :001 > User.in_batches(of: 3) do |relation| 3.0.0 :002 > puts relation.to_sql 3.0.0 :003 > end User Pluck (0.4ms) SELECT

Rails 7.1 adds ActiveRecord::Base::generates_token_for API

Generating special tokens that are unique, tamper proof and that can store information like the purpose of the token and the token's expiry can be very useful in certain scenarios. You can create a unique token for specific purposes like email_verification or password_reset, attach them to your application URL endpoint and send it to the user via email. Up until now, you might have used the ActiveRecord::SignedId API that allows you to create expirable tokens. And you can query ActiveRecord to find the record using the signed id. Consider a scenario where we want to send a

Autoloading pitfalls fixed by Rails 7’s default Zeitwerk mode

Rails 7 onward zeitwerk mode completely replaces classic autoloader thereby resolving the flaws of classic autoloader