From ebaf2390dcfc2e381af8b3f245909dec6ba3d3e8 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 13 Jul 2019 13:41:41 +0800 Subject: [PATCH] fix --- app/models/project_package.rb | 4 ++-- app/views/users/_project_package.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/project_package.rb b/app/models/project_package.rb index 0b484dc4..c1cee357 100644 --- a/app/models/project_package.rb +++ b/app/models/project_package.rb @@ -55,11 +55,11 @@ class ProjectPackage < ActiveRecord::Base end def category - project_package_category.name + project_package_category.en_name end def category_name - project_package_category.en_name + project_package_category.name end def visitable? diff --git a/app/views/users/_project_package.html.erb b/app/views/users/_project_package.html.erb index 35bd106f..66f256c6 100644 --- a/app/views/users/_project_package.html.erb +++ b/app/views/users/_project_package.html.erb @@ -31,7 +31,7 @@ <% can_manage = @type == 'p_package' && (admin_or_business? || current_user.id == @user.id) %>
- <%= image_tag("educoder/project_packages/#{object.category_name}.png") %> + <%= image_tag("educoder/project_packages/#{object.category}.png") %>
@@ -54,7 +54,7 @@
-
<%= object.category %>
+
<%= object.category_name %>