Aqiraqirlone.hashnode.dev·Apr 13, 2024Basics of Ruby Programming.Basics of Ruby Programming Variables and Data Types: In Ruby, variables don't have types; instead, objects have types. Variables simply reference objects. Here's an example: ```ruby name = "John" # String age = 25 # Integer salary = 2500.50 # Float i...Discuss·1 like·59 readsBasic rub
Aqiraqirlone.hashnode.dev·Mar 28, 2024Implementing Background Workers in Rails with SidekiqIn Rails, background workers are typically used to execute tasks asynchronously, outside of the normal request-response cycle. This is useful for time-consuming operations like sending emails, processing large datasets, or interacting with external A...Discuss·36 readsRails background worker
Rashmi Yadavraysrashmi.com·Oct 9, 2023Rails 7.1 Active Record Transaction on return, break and throwIn the latest Rails, a significant change has been made to the behaviour of transactions. Specifically, using return, break, or throw statements will no longer trigger an automatic rollback of the transaction. In Rails 6.1 use of return, break, and t...Discuss·81 readsRails 7.1
Rashmi Yadavraysrashmi.com·Aug 16, 2023Rails 7.1 - authenticated_byRails provides has_secure_password class method to store passwords securely. You need to have password_digest attribute in your model to get it working. For example, if you have a user model class User < ApplicationRecord has_secure_password end T...Discuss·1 like·205 readsRails
Arish Khanarish.hashnode.dev·Aug 6, 2023Exploring ActiveRecord::Base::normalizes in Rails 7.1Occasionally, there’s a need to standardize data before it’s stored in a database. For instance, you might want to convert email addresses to lowercase, eliminate leading and trailing spaces, and more. With the introduction of Rails 7.1, the new Acti...Discuss·2 likesRails 7.1
Dam Tien Hunghungdt-geeky.hashnode.dev·May 23, 2023Aliased attributes with insert_all and upsert_all methodRails 7.1 introduces the ability to use aliased attributes with insert_all and upsert_all methods. This feature allows you to use aliases when bulk inserting or updating records, which can be especially useful when dealing with complex database schem...Discuss·1 likeRuby
Dam Tien Hunghungdt-geeky.hashnode.dev·May 16, 2023Normalizing Attributes using ActiveRecord::Base::normalizesActiveRecord::Base::normalizes Rails 7.1 add ActiveRecord::Base::normalizes API. ActiveRecord::Base::normalizes is a method provided by the normalize gem that is used to normalize data before it is saved to the database. Essentially, normalization is...Discuss·2 likes·61 readsRuby