Rails 6.1 adds support for belongs_to to has_many inversing

Before Rails 6.1, we could only traverse the object chain in one direction - from has_many to belongs_to. Now we can traverse the chain bi-directionally.The inverse_of option, both in belongs_to and has_many is used to specify the name of the inverse association.Let's see an example.
Rails 6.1 adds support for belongs_to to has_many inversing #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (6 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles