Fix Universe names upon export

This commit is contained in:
Donovan Hernandez 2017-02-01 19:24:44 -06:00
parent 06ffb6c943
commit 46e33299ea

View File

@ -142,7 +142,7 @@ class ExportController < ApplicationController
if value.is_a?(ActiveRecord::Associations::CollectionProxy)
value = value.map(&:name).to_sentence
elsif attr.name.end_with?('_id') && value.present?
universe = Universe.where(id: value.to_i)
universe = Universe.where(id: value.to_i).first
value = universe.name if universe
end