From df485002b1f6bef48ea588d7b05a217a233ceb65 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sun, 20 Dec 2015 22:22:01 +0800 Subject: [PATCH] remove redundant asset_path_icon function --- app/helpers/topics_helper.rb | 2 +- app/models/metacode.rb | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb index 362a5f46..482a663c 100644 --- a/app/helpers/topics_helper.rb +++ b/app/helpers/topics_helper.rb @@ -10,7 +10,7 @@ module TopicsHelper topic['value'] = t.name topic['description'] = t.desc.truncate(70) # make this return matched results topic['type'] = t.metacode.name - topic['typeImageURL'] = t.metacode.asset_path_icon + topic['typeImageURL'] = t.metacode.icon topic['permission'] = t.permission topic['mapCount'] = t.maps.count topic['synapseCount'] = t.synapses.count diff --git a/app/models/metacode.rb b/app/models/metacode.rb index a1184e9c..51ac4fa5 100644 --- a/app/models/metacode.rb +++ b/app/models/metacode.rb @@ -14,14 +14,6 @@ class Metacode < ActiveRecord::Base return false end - def asset_path_icon - if icon.start_with?('http') - icon - else - ActionController::Base.helpers.asset_path icon - end - end - #output json with asset_paths merged in def as_json(options) json = super(options.merge!(methods: :asset_path_icon))