Active Record and getting cool with it’s Associates

jaded aizen
3 min readSep 3, 2020
Applications built with rails

How does active record relate to ruby

I’ll go on record saying Active Record is a spectacular break-through in Ruby’s ability for application development. Active Record is a ruby GEM and has to be installed before you will be granted access to all the free functionalities pre-installed in the active record bundle. Fortunately the realm of active record does not need to be a stand-alone operation. With the various free gems available its more logical to get the more robust frameworks that contain the active record gem. One such gem is Rails. Rails have established itself as a diverse, multifaceted, framework that handles the dependencies and environment setup so you can focus more intuitively on the development of your program and not on the structure or installations. The procedure to get your computer fully rails ready are Listed out below

First Install Ruby Coding language the main logic behind ruby programs

$ rbenv install -v 2.2.3

$ ruby -v

Install Homebrew

$(curl -fsSL

https://raw.githubusercontent.com/Homebrew/install/master/install)"

SQL is the preferred language to handle database storage and manipulation and the resource we get through active record.

$ brew install sqlite

Rails This is the main framework that incorporate a collections of gems and Folder to assist in the app development process

$ gem install rails

$ install rails -v 4.2.4

$ rails -v

Git is an optional addition to keep track of all progress through your robust application

$ brew install git

Active Record the language bridge

Once you have made the necessary installations to your computer you will be granted access to the delights of the Rails framework. A major delight given by Active record is its application of ORM, this allows was Active record to aid in the development of robust applications by acting as a bridge between Ruby code that contain methods to manipulate and add crucial functionality to such as performing CRUD data. Those functionalities persist through the SQL databases, which excel in storing and organizing data but fall short in its ability to manipulate and interact with that data in a user friendly way. Both SQL and Ruby are great languages within the scope of their functionality but, together they combine for an incredibly powerful, responsive and robust collaboration. This is especially true within the context of Ruby on Rails the preferred Ruby Gem which includes the Active Record gem and other useful necessary resources. These resources are accessible throughout the framework making dynamic and powerful website capable of running on the internet(from you local machine).

The Association

A major tool leveraged in the Rails Gem is undoubtedly Active Records and the Associations that can be established through it. These associations allow for model A to store individual creations from the class that contains model B, and/or store multiple instances of model A and model B in a joiner C mode. This is the the main tool used to establish the interactions that allow applications to function, by dividing task and having each model maintain the instance created from it, debugging becomes a lot easier and functionality becomes a lot more organized! Individually programs are ants, collectively they are an army. You can visit the links provided for more information on active record or Ruby on Rails:

--

--