Skip to content

Do not use instance variables in service_helper

The following discussion from !47546 (merged) should be addressed:

  • @mayra-cabrera started a discussion: (+2 comments)

    Could we pass the group as an argument rather than using the instance variable? Using instance variables in helpers makes debugging a bit hard since there's no straightforward way to know where @group was initialized

    def scoped_reset_integration_path(integration, group: nil)
      if group.nil?
        reset_admin_application_settings_integration_path(integration)
      else
        reset_group_settings_integration_path(group, integration)
      end
    end