app/policies/proposal_policy.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Class ProposalPolicy has 23 methods (exceeds 20 allowed). Consider refactoring.
Open

class ProposalPolicy
  include ExceptionPolicy

  def initialize(user, record)
    super(user, record)
Severity: Minor
Found in app/policies/proposal_policy.rb - About 2 hrs to fix

    Use alias instead of alias_method in a class body.
    Open

      alias_method :can_history!, :can_show!
    Severity: Minor
    Found in app/policies/proposal_policy.rb by rubocop

    This cop enforces the use of either #alias or #alias_method depending on configuration. It also flags uses of alias :symbol rather than alias bareword.

    Example: EnforcedStyle: prefer_alias (default)

    # bad
    alias_method :bar, :foo
    alias :bar :foo
    
    # good
    alias bar foo

    Example: EnforcedStyle: preferaliasmethod

    # bad
    alias :bar :foo
    alias bar foo
    
    # good
    alias_method :bar, :foo

    Use alias instead of alias_method in a class body.
    Open

      alias_method :can_cancel_form!, :can_cancel!
    Severity: Minor
    Found in app/policies/proposal_policy.rb by rubocop

    This cop enforces the use of either #alias or #alias_method depending on configuration. It also flags uses of alias :symbol rather than alias bareword.

    Example: EnforcedStyle: prefer_alias (default)

    # bad
    alias_method :bar, :foo
    alias :bar :foo
    
    # good
    alias bar foo

    Example: EnforcedStyle: preferaliasmethod

    # bad
    alias :bar :foo
    alias bar foo
    
    # good
    alias_method :bar, :foo

    Use alias instead of alias_method in a class body.
    Open

      alias_method :can_new!, :can_create!
    Severity: Minor
    Found in app/policies/proposal_policy.rb by rubocop

    This cop enforces the use of either #alias or #alias_method depending on configuration. It also flags uses of alias :symbol rather than alias bareword.

    Example: EnforcedStyle: prefer_alias (default)

    # bad
    alias_method :bar, :foo
    alias :bar :foo
    
    # good
    alias bar foo

    Example: EnforcedStyle: preferaliasmethod

    # bad
    alias :bar :foo
    alias bar foo
    
    # good
    alias_method :bar, :foo

    Use alias instead of alias_method in a class body.
    Open

      alias_method :can_update!, :can_edit!
    Severity: Minor
    Found in app/policies/proposal_policy.rb by rubocop

    This cop enforces the use of either #alias or #alias_method depending on configuration. It also flags uses of alias :symbol rather than alias bareword.

    Example: EnforcedStyle: prefer_alias (default)

    # bad
    alias_method :bar, :foo
    alias :bar :foo
    
    # good
    alias bar foo

    Example: EnforcedStyle: preferaliasmethod

    # bad
    alias :bar :foo
    alias bar foo
    
    # good
    alias_method :bar, :foo

    There are no issues that match your filters.

    Category
    Status