Changing a polymorphic_type in Rails — Development (2022)
25-Feb-2022 1901
Code at Shopify is organized in components. As a new team, we decided to take ownership over some existing code and to move it under the component we’re responsible for (payment flexibility). This resulted in moving classes (including models) from one module to another, meaning their namespace had to change. While thinking about how we were going to move certain classes under different modules, we realized we may benefit from changing the way Rails persists a polymorphic association to a database. Our team had not yet entirely agreed on the naming of the modules and classes. We wanted to facilitate name changes during the future build phase of the project.
Changing a polymorphic_type in Rails — Development (2022) #ruby #rubydeveloper #rubyonrails #Changing #polymorphic_type #Rails #Development #(2022) #development https://rubyonrails.ba/link/changing-a-polymorphic_type-in-rails-development-2022