Rails allows using aliased attributes with insert_all and upsert_all | Saeloun Blog
07-Jun-2022 1123
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 #Rails #allows #using #aliased #attributes #insert_all #upsert_all #Saeloun #blog https://rubyonrails.ba/link/rails-allows-using-aliased-attributes-with-insert_all-and-upsert_all-saeloun-blog