ActiveRecord
こういうSQLを得たい。 select * from posts where user_id = ? AND posted_at > ? OR user_id = ? AND posted_at > ? とりあえずやってみた。 Postクラスがあるとする。 以下のカラムをもつ。 user_id posted_at class Post < ActiverecordBase # user_id #…
こういうSQLを得たい。 select * from posts where user_id = ? AND posted_at > ? OR user_id = ? AND posted_at > ? とりあえずやってみた。 Postクラスがあるとする。 以下のカラムをもつ。 user_id posted_at class Post < ActiverecordBase # user_id #…