app/models/content_type.rb

Summary

Maintainability
A
0 mins
Test Coverage

Mass assignment is not restricted using attr_accessible
Open

class ContentType < ActiveRecord::Base
Severity: Critical
Found in app/models/content_type.rb by brakeman

This warning comes up if a model does not limit what attributes can be set through mass assignment.

In particular, this check looks for attr_accessible inside model definitions. If it is not found, this warning will be issued.

Brakeman also warns on use of attr_protected - especially since it was found to be vulnerable to bypass. Warnings for mass assignment on models using attr_protected will be reported, but at a lower confidence level.

Note that disabling mass assignment globally will suppress these warnings.

TODO found
Open

  # TODO: globalize stuff, uncomment later
Severity: Minor
Found in app/models/content_type.rb by fixme

TODO found
Open

  # TODO: humanized and humanized_plural should be capitalized, do as validation or programmatically
Severity: Minor
Found in app/models/content_type.rb by fixme

TODO found
Open

    # TODO: might want to reconsider using a subselect here
Severity: Minor
Found in app/models/content_type.rb by fixme

Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used. You can also write as mapped_fields(*) if you want the method to accept any arguments but don't care about them.
Open

  def mapped_fields(options = {})
Severity: Minor
Found in app/models/content_type.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

There are no issues that match your filters.

Category
Status