Rails 4 scope fix