fixes #7569 - scope's require create callable object (lambda or Proc) for rails 4 upgrade