lib/mods_display/fields/subject.rb in mods_display-0.0.1.beta3 vs lib/mods_display/fields/subject.rb in mods_display-0.0.1.beta4
- old
+ new
@@ -4,15 +4,15 @@
return_values = []
@value.each do |val|
return_text = []
selected_subjects(val).each do |child|
if self.respond_to?(:"process_#{child.name}")
- return_text << self.send(:"process_#{child.name}", child)
+ return_text << self.send(:"process_#{child.name}", child) unless self.send(:"process_#{child.name}", child).to_s.empty?
else
if child.text.include?("--")
return_text << child.text.split("--").map{|t| t.strip }
else
- return_text << child.text
+ return_text << child.text unless child.text.empty?
end
end
end
unless return_text.empty?
return_values << return_text.flatten
\ No newline at end of file