I think `params[:name].present?` may read a little better. (as well as `params[:to].present?` below)

That may just be my personal style, so I leave that :100: % up to your discretion.