Check for `protected_attributes` instead of rails version.