Post.includes(:user).where('sticky=trueORidin(selectpost_idfrom`feeds`whereuser_id=?)',current_user.id).page(params[:page]).per(15)意即SELECTCOUNT(*)FROM`posts`WHERE`posts`.`trashed`=0AND(sticky=trueORidin(selectpost_idfrom`feeds`whereuser_id=1))
慕容708150
一只斗牛犬
相关分类