mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Do the same for the other exports also
This commit is contained in:
parent
827b4ea53e
commit
c87cc02ef8
@ -81,7 +81,8 @@ class ExportController < ApplicationController
|
||||
if value.is_a?(ActiveRecord::Associations::CollectionProxy)
|
||||
value = value.map(&:name).to_sentence
|
||||
elsif attr.end_with?('_id') && value.present?
|
||||
value = Universe.find(value.to_i).name
|
||||
universe = Universe.where(id: value.to_i)
|
||||
value = universe.name if universe
|
||||
end
|
||||
|
||||
content_json[attr] = value
|
||||
@ -110,7 +111,8 @@ class ExportController < ApplicationController
|
||||
if value.is_a?(ActiveRecord::Associations::CollectionProxy)
|
||||
value = value.map(&:name).to_sentence
|
||||
elsif attr.end_with?('_id') && value.present?
|
||||
value = Universe.find(value.to_i).name
|
||||
universe = Universe.where(id: value.to_i)
|
||||
value = universe.name if universe
|
||||
end
|
||||
|
||||
text << " #{attr}: #{value.split("\n").join("\n ")}\n"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user