fix for chinese company name

This commit is contained in:
Harry Bomrah 2018-06-27 23:51:50 +08:00
parent 614103f6d2
commit ec6fae79e4
2 changed files with 15 additions and 1 deletions

View File

@ -29,6 +29,20 @@ class EmployerProfile
end
end
def get_company_name
if self.company_name.empty?
case I18n.locale
when :en
cname = self.company_name_translations["zh_tw"]
when :zh_tw
cname = self.company_name_translations["en"]
end
else
cname = self.company_name
end
return cname
end
def get_industry
RecruitmentIndustry.find(self.industry).industry_title rescue ""
end

View File

@ -17,7 +17,7 @@
<% if user.is_employee? %>
<a href="/<%= I18n.locale.to_s + "/candidates/" + user.to_param %>" target="_blank" ><%= user.name %></a>
<% elsif user.is_employer? %>
<a href="<%= show_member_admin_recruitment_path(user.id) %>" ><%= user.profile.company_name %></a>
<a href="<%= show_member_admin_recruitment_path(user.id) %>" ><%= user.profile.get_company_name %></a>
<% end %>
</td>
<td><%= t("recruitment.user_type.type#{user.user_type.to_s}") %></td>