Aqiraqirlone.hashnode.dev·Apr 2, 2024Mastering ActiveRecord in Ruby on RailsIntroduction: In the world of Ruby on Rails development, ActiveRecord stands tall as the go-to ORM framework for simplifying database interactions. In this article, we'll dive deep into ActiveRecord, exploring its various features and demonstrating h...Discuss·160 readsRuby
Stephan Yustephanyu.hashnode.dev·Mar 13, 2024Ecto vs ActiveRecordIn this post, I am going to take a look at Ecto, a data mapping and database query library designed to provide seamless integration between Elixir code and database operations and compare it to Ruby on Rail's ActiveRecord. Ecto and ActiveRecord are b...DiscussElixir
Bruce Wellsblog.phpfui.com·Feb 20, 2024Late Static Binding in PHPIt is time to cover the Active Record class for my ORM. The Active Record design pattern is well known and there are many implementations in PHP to choose from, so why did I decide to write another one? Pretty simple actually. All the current impleme...Discuss·1 likePHP
Mo' Claudiuskodedmo.hashnode.dev·Feb 8, 2024Auditing in Rails with PaperTrailLet us go on a journey through the world of Rails together, where the saga of data tracking unfolds with the magic of the PaperTrail gem. This narrative isn't just about lines of code; it's about the art of capturing the essence of change within your...DiscussRuby on Rails
Ahmed Nadarahmednadar.hashnode.dev·Jan 11, 2024Simplifying Polymorphic Associations with Rails ActiveRecord::DelegatedTypeHey Rails dev! Ever struggled with handling different types of data in your Rails applications? Well, ActiveRecord::DelegatedType is here to make your life easier. In this guide, I'll walk through how you can use DelegatedType to manage diverse data ...Discuss·385 readsRuby
Seth T.Proseesethcode.com·Dec 4, 2023Integrating Jennifer & Amber v1.0+To get the full experience with Jennifer, we'll first want to install sam. This is Jennifer's CLI tool that has generators for creating models, managing the db creation/resetting, migrations, etc. that aren't currently able to be added quickly and ea...Discuss·66 readsactiverecord
Dhaval Singhwww.dsdev.in·Oct 30, 2023Understanding Rails Callbacks & Common PitfallsContext I recently spent a good chunk of time debugging a bug and in turn, did a lot of research on how Transactions and Touch work with callbacks like after_commit. Below is the debugging "story" I shared on X, if you like reading those, give it a s...Discuss·13 likes·2.1K readsRuby on Rails
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·107 readsRails 7.1
Shabini RajadasforWonolo Engineeringengineeringblog.wonolo.com·Sep 28, 2023Migrate from attr_encrypted to ActiveRecordEncryptionRails 7 introduced in-built encryption called Active Record Encryption and attr_encrypted has reached its expiry. And now many projects are on the verge of moving from attr_encrypted to Active Record Encryption. This blog will explain how this migrat...Discuss·1 like·297 readsRuby on Rails
Srinathblog.vsrinath.dev·Sep 15, 2023Rolling back Rails Database migrationsI ran into a situation at work where I had to roll back Rails migrations to get my database back into a usable state. rails db:migrate:status - This shows us the current status of our migrations. StatusMigration IDMigration up20350319081542Fir...DiscussRails