在sql中,应该如下所示:
SELECT * FROM `categories_description_old` WHERE ((`categories_description` = '') OR (`categories_name` = '') OR (`categories_heading_title` = ''))
我的(丑)解决方案:
conditions = [:categories_name,:categories_heading_title,:categories_description] b = table_categories_description_old.filter(conditions.pop => "") conditions.each do |m| b = b.or(m => "") end