我的应用程序出错了:
SQLite3 3::SQLException: DISTINCT聚合必须有一个参数:从“印象”中选择不同的计数(不同)。“impressionable_id”=?和“印象”。“impressionable_type”=?
我能做什么?
My model product.rb有:
is_impressionable :counter_cache => true, :column_name => :viewed_count, :uniq => true我的控制器
class ProductsController < ApplicationController
impressionist actions: [:show]
def show
...
impressionist(@product, nil, { unique: [:session_hash]})
end
end我的观点有:
= @product.impressionist_count(:filter=>:ip_address)https://stackoverflow.com/questions/34457300
复制相似问题