upgrading to Rails 4: scope with proc