Update scope to use proc for Rails 4