app/models/abilities/administrator.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Method initialize has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def initialize(user)
      merge Abilities::Moderation.new(user)

      can :restore, Comment
      cannot :restore, Comment, hidden_at: nil
Severity: Major
Found in app/models/abilities/administrator.rb - About 2 hrs to fix

    Line is too long. [111/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
    Open

          cannot :comment_as_moderator, [::Legislation::Question, Legislation::Annotation, ::Legislation::Proposal]

    Line is too long. [115/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
    Open

                                          Legislation::Question, Legislation::Proposal, Legislation::Annotation, Topic]

    Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
    Open

          can [:read, :create, :update, :destroy, :add_question, :search_booths, :search_officers, :booth_assignments, :results, :stats], Poll

    There are no issues that match your filters.

    Category
    Status