Rails allows using aliased attributes with insert_all and upsert_all | Saeloun Blog

All of us would have used aliases with SQL queries as it makes the table and column names more readable. The renaming is just a temporary change and the table name does not change in the original database.Rails now support aliased attributes with insert_all and upsert_all, which means we can add aliases in the Active Record model.For example, here we are adding an alias name to the original title attribute of Product.
Rails allows using aliased attributes with insert_all and upsert_all | Saeloun Blog #ruby #rubydeveloper #rubyonrails #blog https://rubyonrails.ba/single/rails-allows-using-aliased-attributes-with-insert_all-and-upsert_all-saeloun-blog

Nezir Zahirovic

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

related articles