Rails

Rails 7.1 secret_key_base in Credentials

Rails 7.1 stores secret_key_base in credentials instead of secrets, following the deprecation of the secrets API for enhanced security

Integrate Replicate in Rails Application

Integrate Replicate in Rails application and effortlessly run various machine learning models in the cloud using Replicate

Sort Rails Models By Association Order

Sort your Rails models by the order of their belongs_to associations using ActiveRecord::Reflection.

Rails 7.1 assert_raises Matches Messages

Check the exception and the message raised by rails or custom errors in tests together with assert_raises in a single line.

Using picture_tag Helper in Rails 7.1

Support for picture_tag helper in Rails. Its usage, advantages, and use cases.

Rails 7.1 Rails.env.local? Method Explained

Rails 7.1 adds Rails.env.local? to check if environment is development or test in one simple call.

Rails 7.1 Postgres Enum Support Extended

Rails 7.1 extends support to rename enum, add enum value and rename enum value for Postgres adapter

Using quarter method by rails 7.1

Get quarter of the date provided for the current year or the custom year.

Customizing Rails Generators with Thor

Templates are an easy way to customize your Rails generators to fix repetitive tasks and make your life easier.

Rails 7.1 Audio Analyzer Sample Rate

Extract the sample rate of an audio file with ActiveStorage::AudioAnalyzer which will return the bit rate, duration, and sample rate