Skip to content

Commit

Permalink
Enables Lint/UselessAccessModifier cop (#6564)
Browse files Browse the repository at this point in the history
And fix all offenses.
  • Loading branch information
brunoarueira committed Dec 1, 2020
1 parent 5877602 commit 8b1a53f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Expand Up @@ -192,3 +192,6 @@ Layout/SpaceInsideHashLiteralBraces:

Layout/SpaceInsideParens:
Enabled: true

Lint/UselessAccessModifier:
Enabled: true
2 changes: 0 additions & 2 deletions lib/active_admin/error.rb
Expand Up @@ -45,8 +45,6 @@ def self.capture
raise new exception
end

private

def self.database_error_classes
@classes ||= []
end
Expand Down
2 changes: 0 additions & 2 deletions lib/active_admin/filters/active_filter.rb
Expand Up @@ -113,8 +113,6 @@ def predicate_association
@predicate_association
end

private

def find_predicate_association
condition_attribute.klass.reflect_on_all_associations.
reject { |r| r.options[:polymorphic] }. #skip polymorphic
Expand Down
2 changes: 0 additions & 2 deletions lib/active_admin/resource/routes.rb
Expand Up @@ -42,8 +42,6 @@ def route_uncountable?
config[:route_collection_name] == config[:route_instance_name]
end

private

class RouteBuilder
def initialize(resource)
@resource = resource
Expand Down
2 changes: 0 additions & 2 deletions lib/active_admin/resource_controller/decorators.rb
Expand Up @@ -57,8 +57,6 @@ def self.wrap(decorator)
@cache[name] ||= wrap! collection_decorator, name
end

private

def self.wrap!(parent, name)
::Class.new parent do
delegate :reorder, :page, :current_page, :total_pages, :limit_value,
Expand Down

0 comments on commit 8b1a53f

Please sign in to comment.