fixed archive problem on orbit
This commit is contained in:
		
							parent
							
								
									20f6dc8687
								
							
						
					
					
						commit
						3a2bdeb804
					
				|  | @ -25,16 +25,19 @@ class ArchivesController < ApplicationController | |||
| 			        } | ||||
| 			      end | ||||
| 				files = archive.archive_file_multiples.order_by(:sort_number=>'asc').collect do |file| | ||||
| 					title = (file.file_title.blank? ?  File.basename(file.file.path) : file.file_title) | ||||
| 					title = (file.file_title.blank? ?  File.basename(file.file.path) : file.file_title) rescue "" | ||||
| 					extension = file.file.file.extension.downcase rescue "" | ||||
| 					url = file.file.url rescue "" | ||||
| 					{ | ||||
| 						"file-name" => title || "", | ||||
| 						"file-type" => file.file.file.extension.downcase || "", | ||||
| 						"file-url" => file.file.url || "" | ||||
| 						"file-name" => title, | ||||
| 						"file-type" =>  extension, | ||||
| 						"file-url" => url | ||||
| 					} | ||||
| 				end | ||||
| 
 | ||||
| 				{ | ||||
| 					"archive-title" => archive.title || "", | ||||
| 					"statuses" => statuses || [], | ||||
| 					"statuses" => statuses, | ||||
| 					"files" => files | ||||
| 				} | ||||
| 			end | ||||
|  | @ -43,6 +46,7 @@ class ArchivesController < ApplicationController | |||
| 				"archives" => archives  | ||||
| 			} | ||||
| 		end | ||||
| 
 | ||||
| 		{ | ||||
| 			"categories" => cats | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue