From 4d28a18804beac40fd7f55b938ff17335212c529 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 18 Jun 2014 18:03:39 +0800 Subject: [PATCH] fixed classname bug for status --- app/controllers/faqs_controller.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/faqs_controller.rb b/app/controllers/faqs_controller.rb index b4bc0bd..65c0780 100644 --- a/app/controllers/faqs_controller.rb +++ b/app/controllers/faqs_controller.rb @@ -2,12 +2,12 @@ class FaqsController < ApplicationController def index faqs = Qa.can_display.order_by(:created_at=>'desc').filter_by_categories f = faqs.collect do |qa| - statuses = qa.statuses.collect do |status| - { - "status" => status, - "status-class" => "status-#{status.downcase}" - } - end + statuses = qa.statuses_with_classname.collect do |status| + { + "status" => status["name"], + "status-class" => "status-#{status['classname']}" + } + end { "link_to_show" => OrbitHelper.url_to_show(qa.to_param), "question" => qa.title,