Tuesday, April 12, 2022

Rails ActiveRecord: 2 ways to write 'where' clause

result = Product.where("description LIKE ?", "%Lorem%")

result = Product.where("description LIKE :term", {term: "%Lorem%"})

Followers

Blog Archive