woot fix metacodes

This commit is contained in:
Devin Howard 2015-10-26 11:53:54 +08:00 committed by Connor Turland
parent 60898fadb2
commit bdb5623a02

View file

@ -13,4 +13,15 @@ class Metacode < ActiveRecord::Base
return true if self.metacode_sets.include? metacode_set
return false
end
def asset_path_icon
ActionController::Base.helpers.asset_path icon
end
#output json with asset_paths merged in
def as_json(options)
json = super(options.merge!(methods: :asset_path_icon))
json["icon"] = json["asset_path_icon"]
json.except("asset_path_icon")
end
end