Check if the scope parameter is .nil?, not .present?
Check if the scope parameter is .nil?, not .present?

As .present? will return false if the given scope yields no records,
but we need to check whether the parameter is passed, not issue spurious
queries.

Estimize/chronomodel,ifad/chronomodel