Use scoped to avoid sql query execution
Avoid deprecation warning with AR 4
Update to pass specs