fix scoped is deprecated in rails4 warning