Fix scoped method to support Rails 4 with back compability