```ruby
require 's3_cors_fileupload/version'
require 's3_cors_fileupload/rails'

module S3CorsFileupload
  def self.active_record_protected_attributes?
    @active_record_protected_attributes ||= ActiveRecord::VERSION::STRING.to_f < 4.0 || !!defined?(ProtectedAttributes)
  end
end
```

Use ActiveRecord::VERSION::MAJOR for version comparisons isntead of invoking :to_f on the full version String
user
```ruby
require 's3_cors_fileupload/version'
require 's3_cors_fileupload/rails'

module S3CorsFileupload
  def self.active_record_protected_attributes?
    @active_record_protected_attributes ||= ::ActiveRecord::VERSION::MAJOR < 4 || !!defined?(ProtectedAttributes)
  end
end
```
assistant