app/models/product.rb
def group_items
    @group_items ||= Product.includes(:pictures)
                         .where(group: group.presence || '_ZZZZ_', active: true, hidden: false)
                         .order(:option_sort, :option_title)
  end
# get items have the same group attribute as this product
get items have the same group attribute as this product
get items have the same group attribute as this product
def group_items
    @group_items ||= Product.includes(:pictures)
                         .where(group: group.presence || '_ZZZZ_', active: true, hidden: false)
                         .order(:option_sort, :option_title)
  end
def group_items @group_items ||= Product . includes ( :pictures ) . where ( group : group . presence || '_ZZZZ_' , active : true , hidden : false ) . order ( :option_sort , :option_title ) end
get items have the same group attribute as this product
get items have the same group attribute as this product