Add an apply Style/RaiseArgs rubocop rule
We were already applying it most of the time.
This commit is contained in:
@@ -449,6 +449,9 @@ Style/PercentLiteralDelimiters:
|
||||
Style/Proc:
|
||||
Enabled: true
|
||||
|
||||
Style/RaiseArgs:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantFileExtensionInRequire:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class Management::BaseController < ActionController::Base
|
||||
private
|
||||
|
||||
def verify_manager
|
||||
raise ActionController::RoutingError.new("Not Found") if current_manager.blank?
|
||||
raise ActionController::RoutingError, "Not Found" if current_manager.blank?
|
||||
end
|
||||
|
||||
def current_manager
|
||||
|
||||
@@ -26,7 +26,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
private
|
||||
|
||||
def sign_in_with(feature, provider)
|
||||
raise ActionController::RoutingError.new("Not Found") unless Setting["feature.#{feature}"]
|
||||
raise ActionController::RoutingError, "Not Found" unless Setting["feature.#{feature}"]
|
||||
|
||||
auth = request.env["omniauth.auth"]
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
|
||||
|
||||
def restrict_access
|
||||
unless current_user.administrator? || current_budget.valuating?
|
||||
raise CanCan::AccessDenied.new(I18n.t("valuation.budget_investments.not_in_valuating_phase"))
|
||||
raise CanCan::AccessDenied, I18n.t("valuation.budget_investments.not_in_valuating_phase")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -114,7 +114,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
|
||||
Budget::ValuatorAssignment.exists?(investment_id: params[:id],
|
||||
valuator_id: current_user.valuator.id)
|
||||
|
||||
raise ActionController::RoutingError.new("Not Found")
|
||||
raise ActionController::RoutingError, "Not Found"
|
||||
end
|
||||
|
||||
def valid_price_params?
|
||||
|
||||
Reference in New Issue
Block a user