app/helpers/application_helper.rb
# rubocop:disable Rails/HelperInstanceVariable
# TODO: refactor enrichment_error_link method to not use an instance variable
disable Rails/HelperInstanceVariable
TODO: refactor enrichment_error_link method to not use an instance variable
disable Rails / HelperInstanceVariable TODO : refactor enrichment_error_link method to not use an instance variable
def enrichment_error_link(model, field, error)
    href = case model
           when :course
             enrichment_error_url(
               provider_code: @provider.provider_code,
               course: @course,
               field: field.to_s,
               message: error,
             )
           when :provider
             provider_enrichment_error_url(
               provider: @provider,
               field: field.to_s,
             )
           end
    govuk_inset_text(classes: "app-inset-text--narrow-border app-inset-text--error") do
      govuk_link_to(error, href)
    end
  end
def enrichment_error_link ( model , field , error ) href = case model when :course enrichment_error_url ( provider_code : @provider . provider_code , course : @course , field : field . to_s , message : error , ) when :provider provider_enrichment_error_url ( provider : @provider , field : field . to_s , ) end govuk_inset_text ( classes : "app-inset-text--narrow-border app-inset-text--error" ) do govuk_link_to ( error , href ) end end
rubocop:disable Rails/HelperInstanceVariable
TODO: refactor enrichment_error_link method to not use an instance variable
rubocop : disable Rails / HelperInstanceVariable TODO : refactor enrichment_error_link method to not use an instance variable
model
<not_specific>
field
<not_specific>
error
<not_specific>