Check for protected_attributes method instead of attr_accessible, as attr_accessible is defined in Rails 4 to generate an error if anyone tries to use it.