metamaps/metamaps

View on GitHub
app/controllers/application_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for handle_unauthorized is too high. [20.4/16]
Open

  def handle_unauthorized
    if authenticated? && (params[:controller] == 'maps') && (params[:action] == 'show')
      redirect_to request_access_map_path(params[:id])
    elsif authenticated?
      redirect_to root_path, notice: "You don't have permission to see that page."

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

There are no issues that match your filters.

Category
Status