<commit_before>require_dependency 'projects_helper'

module ChiliprojectLicenses
  module Patches
    module ProjectsHelperPatch
      def self.included(base)
        base.class_eval do
          unloadable

          def link_to_license(license_version)
            link_to(license_version.title, license_url(license_version))
          end

          def license_url(license_version)
            return license.version.url if license_version.url.present?
            license_version_path(license_version)
          end
        end
      end
    end
  end
end<commit_msg>fixed issue on link generated on Project<commit_after>require_dependency 'projects_helper'

module ChiliprojectLicenses
  module Patches
    module ProjectsHelperPatch
      def self.included(base)
        base.class_eval do
          unloadable

          def link_to_license(license_version)
            link_to(license_version.title, license_url(license_version))
          end

          def license_url(license_version)
            return license.version.url if license_version.url.present?
            license_version_path(license_version.license, license_version)
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0451505016722408, 'fraction_numerical': 0.0, 'mean_word_length': 2.5102639296187683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7657596', 'n_tokens_mistral': 329, 'n_tokens_neox': 314, 'n_words': 68}