Note.
where(:user_id => current_user.id, :notetype => p[:note_type]).
where("date > ?", p[:date]).
order('date ASC, created_at ASC')
or you can also convert everything into the SQL notation
Note.
where("user_id = ? AND notetype = ? AND date > ?", current_user.id, p[:note_type], p[:date]).
order('date ASC, created_at ASC')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…