app/helpers/extensions_helper.rb
#
# Returns a URL for the latest version of the given extension
#
# @param extension [Extension]
#
# @return [String] the URL
#
Returns a URL for the latest version of the given extension
Returns a URL for the latest version of the given extension
def compilation_errors(extension, version=nil)
    errors = []
    if extension.compilation_error.present?
      errors << "Extension: #{extension.compilation_error}"
    end
    versions = extension.extension_versions.select(:id, :version, :compilation_error).where.not(compilation_error: nil)
    versions = versions.where(id: version.id) if version.present?
    versions.each do |version|
      errors << "Version #{version.version}: #{version.compilation_error}"
    end
    errors
  end
def compilation_errors ( extension , version = nil ) errors = [ ] if extension . compilation_error . present? errors << "Extension: #{extension.compilation_error}" end versions = extension . extension_versions . select ( :id , :version , :compilation_error ) . where . not ( compilation_error : nil ) versions = versions . where ( id : version . id ) if version . present? versions . each do | version | errors << "Version #{version.version}: #{version.compilation_error}" end errors end
Returns a URL for the latest version of the given extension
Returns a URL for the latest version of the given extension
None
String
extension
<not_specific>
version
<not_specific>
<not_specific>
None