我想使用 where 方法编写以下查询
SELECT * FROM videos
WHERE 'privacy' = 'public' OR
(privacy = 'private' AND
id IN (SELECT vid
FROM vid_ads
WHERE 'aid'=#{current_id}))
我尝试使用以下查询,但以语法错误结束
Video.where("privacy = 'public' OR
(privacy = 'private' AND id = ?)",
VidAd.where(:aid => current_id).select("vid"))
请帮忙