fixed classname bug for statuses
This commit is contained in:
parent
528c7da723
commit
e75410d6a7
|
@ -17,10 +17,11 @@ class ArchivesController < ApplicationController
|
|||
end
|
||||
end
|
||||
cats = @categories.collect do |cat|
|
||||
archives = ArchiveFile.can_display.where(:category_id => cat["id"]).collect do |archive|
|
||||
statuses = archive.statuses.collect do |status|
|
||||
archives = ArchiveFile.where(:category_id => cat["id"]).collect do |archive|
|
||||
statuses = archive.statuses_with_classname.collect do |status|
|
||||
{
|
||||
"archive-status" => status
|
||||
"status" => status["name"],
|
||||
"status-class" => "status-#{status['classname']}"
|
||||
}
|
||||
end
|
||||
files = archive.archive_file_multiples.collect do |file|
|
||||
|
@ -32,7 +33,7 @@ class ArchivesController < ApplicationController
|
|||
end
|
||||
{
|
||||
"archive-title" => archive.title,
|
||||
"status" => statuses,
|
||||
"statuses" => statuses,
|
||||
"files" => files
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue