Efficient Query With Active Record (SQL)
I have here a basic shopping cart application that has products listed for sale. These products are sorted into categories. But each product can have many categories. We use a many-to-many association here. I have chosen to use has_and_belongs_to for this particular relationship. Products are also tagged. So similarly, each tag can have many products […]