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