diff --git a/app/controllers/web_resources_controller.rb b/app/controllers/web_resources_controller.rb index 2fa146b..382e9bc 100644 --- a/app/controllers/web_resources_controller.rb +++ b/app/controllers/web_resources_controller.rb @@ -3,8 +3,16 @@ class WebResourcesController < ApplicationController def index links = WebLink.order_by(:created_at=>'desc') web_link = links.collect do |link| + statuses = link.statuses.collect do |status| + { + "status" => status, + "status-class" => "status-#{status.downcase}" + } + end { "title" => link.title, + "context" => link.context, + "statuses" => statuses, "link_to_show" => link.url } end