website: handle longer names in downloads

This commit is contained in:
Jack Pearkes 2014-08-06 09:07:50 -04:00
parent f19e7dba58
commit 5a466795c6
2 changed files with 3 additions and 3 deletions

View File

@ -33,8 +33,8 @@ end
module DownloadHelpers
def download_arch(file)
parts = file.split("_")
return "" if parts.length != 3
parts[2].split(".")[0]
return "" if parts.length != 4
parts[3].split(".")[0]
end
def download_os_human(os)

View File

@ -27,7 +27,7 @@ sidebar_current: "downloads-terraform"
<ul>
<% $terraform_files[os].each do |file| %>
<li><a href="<%= download_url(file) %>"><%= download_arch(file) %></a></li>
<% end %>
<% end %>
</ul>
<div class="clearfix">
</div>