happiness (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) happiness

ActiveRecord

WIP ActiveRecordでAND条件をORしたいときの方法

とりあえずやってみた posted_ats_and_user_ids = [[today, 1], [tomorrow, 2]] conditions = Array.new(posted_ats_and_ids.size) { "id = ? AND posted_at > ?" }.join(" OR ") # => "id = ? AND posted_at > ? OR id = ? AND posted_at > ?" Post.where(c…

&&(^(( ^)

ビビビビビ.... ___ _________ _ _________&&(^(( ^)