Fix scopes to rails3/4 style