fixed classname bugs for statuses

This commit is contained in:
Harry Bomrah 2014-06-18 18:07:48 +08:00
parent 7f58aba75e
commit 9ca5c3b037
1 changed files with 6 additions and 6 deletions

View File

@ -3,10 +3,10 @@ class WebResourcesController < ApplicationController
def index def index
links = WebLink.can_display.filter_by_categories links = WebLink.can_display.filter_by_categories
web_link = links.collect do |link| web_link = links.collect do |link|
statuses = link.statuses.collect do |status| statuses = link.statuses_with_classname.collect do |status|
{ {
"status" => status, "status" => status["name"],
"status-class" => "status-#{status.downcase}" "status-class" => "status-#{status['classname']}"
} }
end end
{ {
@ -25,10 +25,10 @@ class WebResourcesController < ApplicationController
def widget def widget
links = WebLink.can_display.filter_by_widget_categories links = WebLink.can_display.filter_by_widget_categories
web_link = links.collect do |link| web_link = links.collect do |link|
statuses = link.statuses.collect do |status| statuses = link.statuses_with_classname.collect do |status|
{ {
"status" => status, "status" => status["name"],
"status-class" => "status-#{status.downcase}" "status-class" => "status-#{status['classname']}"
} }
end end
{ {