Update scope generation code to support Rails 4