The Magic of Associations with ActiveRecord

The world of Object Oriented Programming seemed very complex and confusing to me. It was only when I realised that the models we create represented real-life objects and the way they interacted with each other were like relationships between objects, for example, if you looked at a restaurant reviewing app. The objects could be customer, restaurant, and the review. This would be a many through relationship. Many customers could be linked with many restaurants through the reviews.When I was first introduced to object relationships it was using Ruby alone with no other frameworks/libraries. To set up the example of restaurant reviews you’d do something like this.
The Magic of Associations with ActiveRecord #ruby #rubydeveloper #rubyonrails #activerecord https://rubyonrails.ba/single/the-magic-of-associations-with-activerecord

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles