Commit 85de3f69 authored by tiagonbotelho's avatar tiagonbotelho Committed by Yorick Peterse

changes if ! to unless and now asks for language instead of languages

parent fe934a2d
......@@ -947,10 +947,11 @@ class Project < ActiveRecord::Base
end
def main_language
if !empty_repo?
unless empty_repo?
Rails.cache.fetch([self, "language"]) do
languages = Linguist::Repository.new(@repository.rugged, @repository.rugged.head.target_id).languages
languages.key(languages.values.max)
Linguist::Repository.new(
@repository.rugged,
@repository.rugged.head.target_id).language
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment